X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=trace.c;h=ffecfbbfe49a05a92d617c529cbebed2fa34899e;hp=b8dc00120c9fd959ab201c9f4d1625b6b684d819;hb=5463e1b62a39ce417b610584e3d34a8bc30ac15e;hpb=b0bd74e35e935aa976b68c594def4e8d2c22ef95 diff --git a/trace.c b/trace.c index b8dc001..ffecfbb 100644 --- a/trace.c +++ b/trace.c @@ -264,6 +264,7 @@ void _end_trace(const char *__file, int __line) FILE *fp; struct admin_list *admin; struct admin_queue *response, **responsep; /* response pointer */ + int ret; if (!trace.name[0]) PERROR("trace not started in file %s line %d\n", __file, __line); @@ -273,12 +274,12 @@ void _end_trace(const char *__file, int __line) if (string) { /* process debug */ if (options.deb) - debug(NULL, 0, "TRACE", string); + debug(NULL, NULL, 0, "TRACE", string); /* process log */ if (options.log[0]) { fp = fopen(options.log, "a"); if (fp) { - fwrite(string, strlen(string), 1, fp); + ret = fwrite(string, strlen(string), 1, fp); fclose(fp); } } @@ -310,6 +311,7 @@ void _end_trace(const char *__file, int __line) /* attach to response chain */ *responsep = response; responsep = &response->next; + admin->fd.when |= LCR_FD_WRITE; } } admin = admin->next;