|
@@ -27,6 +27,7 @@
|
|
|
* History:
|
|
|
* --------
|
|
|
* 2003-12-03 : fifo_callback() updated for changes in tm callbacks (bogdan)
|
|
|
+ * 2004-02-11: fix: TM callback writes to fifo changed to non-blocking (jiri)
|
|
|
*/
|
|
|
|
|
|
#include <string.h>
|
|
@@ -560,12 +561,11 @@ static void fifo_callback( struct cell *t, int type, struct tmcb_params *ps )
|
|
|
text.s = ps->rpl->first_line.u.reply.reason.s;
|
|
|
text.len = ps->rpl->first_line.u.reply.reason.len;
|
|
|
|
|
|
- f = fopen(filename, "wt");
|
|
|
- if (!f) goto done;
|
|
|
- fprintf(f, "%d %.*s\n", ps->rpl->first_line.u.reply.statuscode,
|
|
|
- text.len, text.s);
|
|
|
- print_uris(f, ps->rpl);
|
|
|
- fprintf(f, "%s\n", ps->rpl->headers->name.s);
|
|
|
+ f = open_reply_pipe(filename);
|
|
|
+ if (!f) return;
|
|
|
+ fprintf(f, "%d %.*s\n", reply->first_line.u.reply.statuscode, text.len, text.s);
|
|
|
+ print_uris(f, reply);
|
|
|
+ fprintf(f, "%s\n", reply->headers->name.s);
|
|
|
fclose(f);
|
|
|
}
|
|
|
DBG("DEBUG: fifo_callback sucesssfuly completed\n");
|