Fix the ability to designate a file echo area as a Passthru by specifying a BBS area of 0.
This commit is contained in:
parent
48f64baecc
commit
b57c169ee5
@ -1,3 +1,8 @@
|
||||
v1.0.6.15 06-Mar-2017 - Andrew Leary
|
||||
|
||||
1. Fixed the ability to designate a file echo area as a
|
||||
passthru by specifying a BBS area of 0.
|
||||
|
||||
v1.0.6.14 28-Jan-2017 - Andrew Leary
|
||||
|
||||
1. Changed the storage format for the last OLR download
|
||||
|
2
configure
vendored
2
configure
vendored
@ -2309,7 +2309,7 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbutils mbnntp mbtask mbsetup unix lang
|
||||
PACKAGE="mbsebbs"
|
||||
MAJOR="1"
|
||||
MINOR="0"
|
||||
REVISION="6.14"
|
||||
REVISION="6.15"
|
||||
VERSION="$MAJOR.$MINOR.$REVISION"
|
||||
COPYRIGHT="Copyright (C) 1997-2017 MBSE Development Team, All Rights Reserved"
|
||||
SHORTRIGHT="Copyright (C) 1997-2017 MBSE DevTm"
|
||||
|
@ -12,7 +12,7 @@ AC_SUBST(SUBDIRS)
|
||||
PACKAGE="mbsebbs"
|
||||
MAJOR="1"
|
||||
MINOR="0"
|
||||
REVISION="6.14"
|
||||
REVISION="6.15"
|
||||
VERSION="$MAJOR.$MINOR.$REVISION"
|
||||
COPYRIGHT="Copyright (C) 1997-2017 MBSE Development Team, All Rights Reserved"
|
||||
SHORTRIGHT="Copyright (C) 1997-2017 MBSE DevTm"
|
||||
|
@ -563,7 +563,7 @@ char *select_pick(int max, int items)
|
||||
break;
|
||||
}
|
||||
pick = atoi(menu);
|
||||
if ((pick >= 1) && (pick <= max))
|
||||
if ((pick >= 0) && (pick <= max))
|
||||
break;
|
||||
|
||||
working(2, 0, 0);
|
||||
|
@ -703,13 +703,13 @@ int PickFilearea(char *shdr)
|
||||
working(1, 0, 0);
|
||||
if (config_read() == -1) {
|
||||
working(2, 0, 0);
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
records = CountFilearea();
|
||||
if (records == -1) {
|
||||
working(2, 0, 0);
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -752,7 +752,7 @@ int PickFilearea(char *shdr)
|
||||
strcpy(pick, select_pick(records, 20));
|
||||
|
||||
if (strncmp(pick, "-", 1) == 0)
|
||||
return 0;
|
||||
return -1;
|
||||
|
||||
if (strncmp(pick, "N", 1) == 0)
|
||||
if ((o + 20) < records)
|
||||
@ -762,6 +762,9 @@ int PickFilearea(char *shdr)
|
||||
if ((o - 20) >= 0)
|
||||
o -= 20;
|
||||
|
||||
if (!atoi(pick)) /* 0 = passthru file area */
|
||||
return 0;
|
||||
|
||||
if ((atoi(pick) >= 1) && (atoi(pick) <= records)) {
|
||||
snprintf(temp, PATH_MAX, "%s/etc/fareas.data", getenv("MBSE_ROOT"));
|
||||
if ((fil = fopen(temp, "r")) != NULL) {
|
||||
|
@ -827,15 +827,18 @@ int EditTicRec(int Area)
|
||||
for (;;) {
|
||||
|
||||
snprintf(temp, PATH_MAX, "%s/etc/fareas.data", getenv("MBSE_ROOT"));
|
||||
if ((fp = fopen(temp, "r")) != NULL) {
|
||||
fread(&areahdr, sizeof(areahdr), 1, fp);
|
||||
fseek(fp, ((tic.FileArea - 1) * areahdr.recsize) + areahdr.hdrsize, SEEK_SET);
|
||||
fread(&area, areahdr.recsize, 1, fp);
|
||||
snprintf(temp, 81, "%d: %s", tic.FileArea, area.Name);
|
||||
if (!tic.FileArea) {
|
||||
snprintf(temp, 81, "%d: %s", tic.FileArea, "Passthru");
|
||||
temp[24] = '\0';
|
||||
fclose(fp);
|
||||
} else {
|
||||
snprintf(temp, 81, "%d", tic.FileArea);
|
||||
} else if ((fp = fopen(temp, "r")) != NULL) {
|
||||
fread(&areahdr, sizeof(areahdr), 1, fp);
|
||||
fseek(fp, ((tic.FileArea - 1) * areahdr.recsize) + areahdr.hdrsize, SEEK_SET);
|
||||
fread(&area, areahdr.recsize, 1, fp);
|
||||
snprintf(temp, 81, "%d: %s", tic.FileArea, area.Name);
|
||||
temp[24] = '\0';
|
||||
fclose(fp);
|
||||
} else {
|
||||
snprintf(temp, 81, "%d", tic.FileArea);
|
||||
}
|
||||
|
||||
set_color(WHITE, BLACK);
|
||||
@ -906,7 +909,7 @@ int EditTicRec(int Area)
|
||||
SetTicScreen();
|
||||
break;
|
||||
case 4: tmp = PickFilearea((char *)"10.2.4");
|
||||
if (tmp != 0)
|
||||
if (tmp != -1)
|
||||
tic.FileArea = tmp;
|
||||
SetTicScreen();
|
||||
break;
|
||||
|
Reference in New Issue
Block a user