X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=libs%2Fshttpd%2Flog.c;h=583142f3e0e61a050756e0aa75e4aeb714d5160c;hb=9b22dd53fe62e312c1647310b7ec43aa127090af;hp=4b436106781f1a4868df414df02ccc1770ed3b01;hpb=d8ccfe2b3944adf07d35534459cdda19d15217c8;p=fms.git diff --git a/libs/shttpd/log.c b/libs/shttpd/log.c index 4b43610..583142f 100644 --- a/libs/shttpd/log.c +++ b/libs/shttpd/log.c @@ -22,7 +22,7 @@ elog(int flags, struct conn *c, const char *fmt, ...) va_list ap; /* Print to stderr */ - if (c == NULL || c->ctx->inetd_mode == 0) { + if (c == NULL || !IS_TRUE(c->ctx, OPT_INETD)) { va_start(ap, fmt); (void) vfprintf(stderr, fmt, ap); (void) fputc('\n', stderr); @@ -48,15 +48,6 @@ elog(int flags, struct conn *c, const char *fmt, ...) (void) fflush(fp); } -#if defined(_WIN32) && !defined(NO_GUI) - { - extern HWND hLog; - - if (hLog != NULL) - SendMessage(hLog, WM_APP, 0, (LPARAM) buf); - } -#endif /* _WIN32 */ - if (flags & E_FATAL) exit(EXIT_FAILURE); } @@ -85,7 +76,7 @@ log_access(FILE *fp, const struct conn *c) } (void) strftime(date, sizeof(date), "%d/%b/%Y:%H:%M:%S", - localtime(¤t_time)); + localtime(&c->birth_time)); (void) my_snprintf(buf, sizeof(buf), "%s - %.*s [%s %+05d] \"%s\" %d %lu %s%.*s%s %s%.*s%s", @@ -99,13 +90,4 @@ log_access(FILE *fp, const struct conn *c) (void) fprintf(fp, "%s\n", buf); (void) fflush(fp); } - -#if defined(_WIN32) && !defined(NO_GUI) - { - extern HWND hLog; - - if (hLog != NULL) - SendMessage(hLog, WM_APP, 0, (LPARAM) buf); - } -#endif /* _WIN32 */ }