From 1c8e9f27694d3c7640b72d467bab18e4cf3afa04 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Fri, 18 Oct 2002 18:23:35 +0000 Subject: [PATCH] Made some bug fixes final --- ChangeLog | 11 ++++++----- TODO | 5 +---- lib/dbdupe.c | 21 ++++++++------------- mbfido/rfc2ftn.c | 1 - mbfido/scannews.c | 10 ++-------- mbfido/tosspkt.c | 1 - 6 files changed, 17 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1dc204db..546a9381 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,5 @@ $Id$ -WARNING: Extra debug logging enabled for checking internet news dupes. - This will just make bigger logfiles if you gate news. - Since 28-08-2002 mbfido news produces real big logs!! - Extra debug logging will be removed around 14 Oct 2002. - MBSEBBS History. @@ -36,6 +31,8 @@ v0.35.04 29-Sep-2002 Files and echomail security flags implemented. Echomail rescan will also work with newsgroups. Removed some debug logging with files replace. + Fixed trashing news dupes file when mbfido was called multiple + times. Improved program locking. mbsetup: Added setup for the nodes record for security flags. @@ -44,6 +41,10 @@ v0.35.04 29-Sep-2002 Added setup for the tic areas security flags. Added setup for the message areas security flags. Menu 14, edit files database had the wrong selection prompt. + Fixed backspace/delete key issue. + + mbmon: + Fixed backspace/delete key issue. mbindex: Removed debug logging. diff --git a/TODO b/TODO index 54eb99e4..f67d2bb0 100644 --- a/TODO +++ b/TODO @@ -79,7 +79,7 @@ mbfido: L: Add %from command to areamgr/filemgr. - N: Add areas security with flags. + L: Add netmail notification of changed areas. mbcico: L: Implement modem connect response translation for ISDN lines, i.e. @@ -158,6 +158,3 @@ mbsetup: Fileecho groups <=> Newfile reports Fileecho groups <=> BBS Areas - N: Add backspace test and store result in global setup. - Note: experimental patch to test Rubout key as backspace. - diff --git a/lib/dbdupe.c b/lib/dbdupe.c index 37efa1d0..86b14b71 100644 --- a/lib/dbdupe.c +++ b/lib/dbdupe.c @@ -1,6 +1,6 @@ /***************************************************************************** * - * %Id$ + * $Id$ * Purpose ...............: Dupe checking. * ***************************************************************************** @@ -56,7 +56,7 @@ void InitDupes() { int i; - Syslog('n', "Init Dupes"); + Syslog('N', "Init Dupes"); for (i = 0; i < 3; i++) { dupes[i].crcs= NULL; dupes[i].loaded = FALSE; @@ -111,18 +111,18 @@ int CheckDupe(unsigned long crc, int idx, int max) dupes[idx].crcs[dupes[idx].count] = test; dupes[idx].count++; } - Syslog('n', "Loaded %d dupe records in %s", dupes[idx].count++, files[idx]); + Syslog('N', "Loaded %d dupe records in %s", dupes[idx].count++, files[idx]); fclose(fil); free(dfile); dupes[idx].loaded = TRUE; dupes[idx].max = max; } - Syslog('n', "dupetest %08x %s %d", crc, files[idx], max); + // Syslog('N', "dupetest %08x %s %d", crc, files[idx], max); for (i = 0; i < dupes[idx].count; i++) { if (dupes[idx].crcs[i] == crc) { - Syslog('n', "dupe at %d", i); + // Syslog('N', "dupe at %d", i); return TRUE; } } @@ -130,7 +130,7 @@ int CheckDupe(unsigned long crc, int idx, int max) * Not a dupe, append new crc value */ dupes[idx].crcs[dupes[idx].count] = crc; - Syslog('n', "Added new dupe at %d", dupes[idx].count); + // Syslog('N', "Added new dupe at %d", dupes[idx].count); dupes[idx].count++; dupes[idx].changed = TRUE; @@ -151,7 +151,7 @@ void CloseDdb(int idx) FILE *fil; dfile = calloc(PATH_MAX, sizeof(char)); - Syslog('n', "Checking %s.dupe", files[idx]); +// Syslog('N', "Checking %s.dupe", files[idx]); if (dupes[idx].loaded) { if (dupes[idx].changed) { if (dupes[idx].count > dupes[idx].max) @@ -160,15 +160,13 @@ void CloseDdb(int idx) start = 0; sprintf(dfile, "%s/etc/%s.dupe", getenv("MBSE_ROOT"), files[idx]); if ((fil = fopen(dfile, "w"))) { - Syslog('n', "Writing dupes %d to %d", start, dupes[idx].count); + Syslog('N', "Writing dupes %d to %d", start, dupes[idx].count); for (j = start; j < dupes[idx].count; j++) fwrite(&dupes[idx].crcs[j], sizeof(unsigned long), 1, fil); fclose(fil); } else { WriteError("$Can't write %s", dfile); } - } else { - Syslog('n', "Not changed so not saved"); } dupes[idx].changed = FALSE; @@ -179,8 +177,6 @@ void CloseDdb(int idx) free(dupes[idx].crcs); dupes[idx].crcs = NULL; - } else { - Syslog('n', "Not loaded"); } free(dfile); } @@ -191,7 +187,6 @@ void CloseDupes() { int i; - Syslog('n', "Closing dupes databases"); for (i = 0; i < 3; i++) CloseDdb(i); } diff --git a/mbfido/rfc2ftn.c b/mbfido/rfc2ftn.c index 706fa6cf..5d0da85f 100644 --- a/mbfido/rfc2ftn.c +++ b/mbfido/rfc2ftn.c @@ -77,7 +77,6 @@ static int dirtyoutcode = CHRS_NOTSET; */ extern int do_quiet; extern int do_learn; -extern int most_debug; extern int news_in; extern int email_in; extern char *replyaddr; diff --git a/mbfido/scannews.c b/mbfido/scannews.c index acc7fddb..c7a76cbe 100644 --- a/mbfido/scannews.c +++ b/mbfido/scannews.c @@ -189,15 +189,12 @@ void ScanNews(void) struct msgareashdr Msgshdr; struct msgareas Msgs; -most_debug = TRUE; IsDoing((char *)"Scan News"); if (nntp_connect() == -1) { WriteError("Can't connect to newsserver"); -most_debug = FALSE; return; } if (get_xoverview()) { -most_debug = FALSE; return; } @@ -248,7 +245,6 @@ most_debug = FALSE; free(tmp); } do_flush = TRUE; -most_debug = FALSE; if (!do_quiet) printf("\r \r"); } @@ -303,9 +299,9 @@ int do_one_group(List **art, char *grpname, char *ftntag, int maxarticles) /* * If the message isn't a dupe, it must be new for us. */ -// most_debug = TRUE; + most_debug = TRUE; get_article(tmp->msgid, ftntag); -// most_debug = FALSE; + most_debug = FALSE; fetched++; } } @@ -519,7 +515,6 @@ int get_xoverview(void) } if ((tmp = xoverview) != NULL) { -// most_debug = TRUE; Syslog('N', "--Xoverview.fmt list"); while (tmp != NULL) { if (tmp->header != NULL) { @@ -527,7 +522,6 @@ int get_xoverview(void) } tmp = tmp->next; } -// most_debug = FALSE; } } else { return 1; diff --git a/mbfido/tosspkt.c b/mbfido/tosspkt.c index e37dd3e1..5fb349d8 100644 --- a/mbfido/tosspkt.c +++ b/mbfido/tosspkt.c @@ -59,7 +59,6 @@ extern int do_quiet; extern int do_unsec; extern int check_dupe; extern time_t t_start; -extern int most_debug;