From 88b21d47fdfd325539a9a3d6aa8597fe42b89026 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sat, 25 Sep 2004 11:19:22 +0000 Subject: [PATCH] Changed logging --- ChangeLog | 2 ++ mbfido/msg.c | 15 ++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 47fe5e95..22310f08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -55,6 +55,8 @@ v0.61.4 11-Aug-2004 During scan the Msg_Read function is now called with a width of 79 characters instead of 78. This fixes the missing address on Origin lines of 79 characters long. + The *.msg function now uses Fgets instead of fgets to read the + message. mbfile: The html index now uses html named character entities on the diff --git a/mbfido/msg.c b/mbfido/msg.c index 2b3e6d7a..cd4aaea9 100644 --- a/mbfido/msg.c +++ b/mbfido/msg.c @@ -136,10 +136,10 @@ int toss_onemsg(char *msgname) strncpy(subject, buf+0x48, 72); strncpy(DateTime, buf+0x90, 20); - Syslog('m', "\"%s\"", printable(fromUserName, 0)); - Syslog('m', "\"%s\"", printable(toUserName, 0)); - Syslog('m', "\"%s\"", printable(subject, 0)); - Syslog('m', "\"%s\"", printable(DateTime, 0)); + Syslog('m', "From \"%s\"", printable(fromUserName, 0)); + Syslog('m', "To \"%s\"", printable(toUserName, 0)); + Syslog('m', "Subj \"%s\"", printable(subject, 0)); + Syslog('m', "Date \"%s\"", printable(DateTime, 0)); destNode = (buf[0xa7] << 8) + buf[0xa6]; origNode = (buf[0xa9] << 8) + buf[0xa8]; @@ -153,11 +153,8 @@ int toss_onemsg(char *msgname) Syslog('m', "From %d:%d/%d.%d to %d:%d/%d.%d", origZone, origNet, origNode, origPoint, destZone, destNet, destNode, destPoint); - while (fgets(temp, PATH_MAX-1, fp)) { - Striplf(temp); - if (temp[strlen(temp)-1] == '\r') - temp[strlen(temp)-1] = '\0'; - Syslogp('m', printable(temp, 0)); + while (Fgets(temp, PATH_MAX-1, fp)) { + Syslog('m', "Line \"%s\"", printable(temp, 0)); if (!strncmp(temp, "\001MSGID: ", 8)) { msgid = xstrcpy(temp + 8); /*