From 03bc6ee9d075f6901654eddc38e35415c2353329 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 2 Nov 2003 11:51:10 +0000 Subject: [PATCH] Fixed mbfile area seek bug --- ChangeLog | 4 ++++ TODO | 5 +---- mbfido/mbfile.c | 22 ++++++++++++---------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98fafe1a..7dcda1ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,10 @@ v0.39.1 22-Oct-2003 Fixed a bug where the bbs goes into a loop after idle timeout during login (and maybe in other situations). + mbfile: + When the areanumber with the adopt command was not given, the + help is displayed instead of trying area 0 that doesn't exist. + mbsetup: In node editor, fixed error message when there was no more room for new nodes to point to the right menus. diff --git a/TODO b/TODO index 761ca416..036f5a08 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,6 @@ $Id$ - MBSE BBS V0.38.0 TODO list. + MBSE BBS V0.39.1 TODO list. --------------------------- These are a list of things that must be implemented one way or @@ -130,9 +130,6 @@ mbfile: N: Add area sorting - N: If area is missing on the commandline, mbfile searches for record - 0 wich doesn't exist. - mbmsg: N: With the post command if a netmail area is used the netmail area will cause trouble later, should be blocked to be used on netmail diff --git a/mbfido/mbfile.c b/mbfido/mbfile.c index 95bfcf85..7d85abe0 100644 --- a/mbfido/mbfile.c +++ b/mbfido/mbfile.c @@ -104,23 +104,25 @@ int main(int argc, char **argv) cmd = xstrcat(cmd, argv[i]); if (!strncasecmp(argv[i], "a", 1)) { - do_adopt = TRUE; i++; Area = atoi(argv[i]); cmd = xstrcat(cmd, (char *)" "); cmd = xstrcat(cmd, argv[i]); - i++; - FileName = xstrcpy(argv[i]); - cmd = xstrcat(cmd, (char *)" "); - cmd = xstrcat(cmd, argv[i]); - if (argc > (i + 1)) { + if (Area) { + do_adopt = TRUE; i++; + FileName = xstrcpy(argv[i]); cmd = xstrcat(cmd, (char *)" "); cmd = xstrcat(cmd, argv[i]); - if (!strncasecmp(argv[i], "-a", 2)) { - do_annon = TRUE; - } else { - Description = xstrcpy(argv[i]); + if (argc > (i + 1)) { + i++; + cmd = xstrcat(cmd, (char *)" "); + cmd = xstrcat(cmd, argv[i]); + if (!strncasecmp(argv[i], "-a", 2)) { + do_annon = TRUE; + } else { + Description = xstrcpy(argv[i]); + } } } } else if ((!strncasecmp(argv[i], "d", 1)) || (!strncasecmp(argv[i], "u", 1))) {