From 1c5cf0f96ae4e91b3ff358b2ebc0e7fd67dee06b Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Wed, 11 Feb 2009 20:02:18 +0000 Subject: [PATCH] Include the current system time in log messages (so they contain the time of event rather than the time of their were actually logged, which could be later) --- src/sbbs3/ntsvcs.c | 1 + src/sbbs3/ntsvcs.h | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sbbs3/ntsvcs.c b/src/sbbs3/ntsvcs.c index 445b4b22b5..9d8e405cc6 100644 --- a/src/sbbs3/ntsvcs.c +++ b/src/sbbs3/ntsvcs.c @@ -294,6 +294,7 @@ static int svc_lputs(void* p, int level, const char* str) len = strlen(str); SAFECOPY(msg.buf, str); msg.level = level; + GetLocalTime(&msg.time); /* Mailslot Logging (for sbbsctrl) */ if(svc->log_handle != INVALID_HANDLE_VALUE /* Invalid log handle? */ diff --git a/src/sbbs3/ntsvcs.h b/src/sbbs3/ntsvcs.h index 82d0d59c7e..8b807df303 100644 --- a/src/sbbs3/ntsvcs.h +++ b/src/sbbs3/ntsvcs.h @@ -55,8 +55,9 @@ enum { }; typedef struct { - char level; - char buf[1024]; + SYSTEMTIME time; + char level; + char buf[1000]; } log_msg_t; #endif /* Don't add anything after this line */ \ No newline at end of file -- GitLab