From 208fa17e1ba655bfbecacf55172db9655e38d537 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Mon, 24 Jun 2002 21:55:03 +0000 Subject: [PATCH] Several fixes and patches from users --- AUTHORS | 1 + ChangeLog | 13 +++++++++++++ mbfido/createf.c | 2 ++ mbfido/createm.c | 2 ++ mbfido/mbindex.c | 5 +++++ mbsebbs/funcs.c | 4 ++-- 6 files changed, 25 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index e1002f1c..ca569d11 100644 --- a/AUTHORS +++ b/AUTHORS @@ -40,4 +40,5 @@ Johannes Beekhuizen 2:280/1018@fidonet Lukas De Groen 2:280/1027@fidonet Vince Coen 2:257/609@fidonet Joachim Kuwan 2:249/591@fidonet +Greek greek@voyager.nnov.ru diff --git a/ChangeLog b/ChangeLog index b8accd6b..882c0a2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -31,6 +31,19 @@ v0.35.02 22-Jun-2002 In newsmode when a mesage is received with an illegal formated date headerline, the date is replaced with the current date and time. Possible cause: SunMail 1.0 + When reading taglists if there was no description after the + tag, mbfido would crash. + + mbindex: + Fixed a crash when a pointlist contained Point,5,reservered, + and nothing more. + Added nopper code to prevent timeout on slow systems with + large pointlists to compile. + + mbsebbs: + The email address in new created .signature files is only + added if global Give Email is true and in the userecord the + email is also enabled. mbtask: When first run the goldnode command is only filled in if it diff --git a/mbfido/createf.c b/mbfido/createf.c index 815959e2..3a1684f5 100644 --- a/mbfido/createf.c +++ b/mbfido/createf.c @@ -162,6 +162,8 @@ int CheckTicGroup(char *Area, int SendUplink, faddr *f) if (strlen(buf) && isalnum(buf[0])) { tag = strtok(buf, "\t \r\n\0"); p = strtok(NULL, "\r\n\0"); + if (p == NULL) + p = tag; /* If no description after the TAG, use TAG as description */ desc = p; while ((*desc == ' ') || (*desc == '\t')) desc++; diff --git a/mbfido/createm.c b/mbfido/createm.c index a62f2198..406a181f 100644 --- a/mbfido/createm.c +++ b/mbfido/createm.c @@ -110,6 +110,8 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f) if (strlen(buf) && isalnum(buf[0])) { tag = strtok(buf, "\t \r\n\0"); p = strtok(NULL, "\r\n\0"); + if (p == NULL) + p = tag; /* If no description after the TAG, use TAG as description */ desc = p; while ((*desc == ' ') || (*desc == '\t')) desc++; diff --git a/mbfido/mbindex.c b/mbfido/mbindex.c index 3897de38..22b95841 100644 --- a/mbfido/mbindex.c +++ b/mbfido/mbindex.c @@ -426,6 +426,7 @@ int compile(char *nlname, unsigned short zo, unsigned short ne, unsigned short n while (!feof(nl)) { + Nopper(); ndx.offset = ftell(nl); lineno++; if (fgets(buf, sizeof(buf)-1, nl) == NULL) @@ -611,6 +612,8 @@ int compile(char *nlname, unsigned short zo, unsigned short ne, unsigned short n continue; if ((q = strchr(p, ','))) *q++ = '\0'; + if (q == NULL) + q = p; } if (strlen(p) > 35) p[35] = '\0'; @@ -626,6 +629,8 @@ int compile(char *nlname, unsigned short zo, unsigned short ne, unsigned short n continue; if ((q = strchr(p, ','))) *q++ = '\0'; + if (q == NULL) + q = p; } if ((strlen(p) == 3) && (!strcmp(p, "300")) && (q != NULL)) { if ((strstr(q, (char *)"X75")) || diff --git a/mbsebbs/funcs.c b/mbsebbs/funcs.c index 0e7ffec9..80d0ad1a 100644 --- a/mbsebbs/funcs.c +++ b/mbsebbs/funcs.c @@ -172,8 +172,8 @@ char *ChangeHomeDir(char *Name, int Mailboxes) if ((fp = fopen(temp, "w")) == NULL) { WriteError("$Can't create %s", temp); } else { - fprintf(fp, " Gtx, %s\n", exitinfo.sUserName); - if (CFG.EmailMode == E_PRMISP) + fprintf(fp, " Greetings, %s\n", exitinfo.sUserName); + if ((CFG.EmailMode == E_PRMISP) && exitinfo.Email && CFG.GiveEmail) fprintf(fp, " email: %s@%s\n", exitinfo.Name, CFG.sysdomain); fclose(fp); }