v1.0.7.12 - Fix bad/orphan .TIC support to support .TIC files with names longer

than 8 characters; fix empty partial files left in temporary inbound when a
remote Binkp site attempts to send a 0 byte file.
This commit is contained in:
Andrew Leary 2019-03-15 07:30:23 -04:00
parent 0ab1656370
commit c67670029a
8 changed files with 32 additions and 10 deletions

View File

@ -1,3 +1,15 @@
v1.0.7.12 15-Mar-2019 - Andrew Leary
1. MBCICO will no longer leave partial files in the temporary
inbound when a remote Binkp site attempts to send a zero byte
file. An M_GOT message will be sent to remove the zero byte
file from the remote's queue.
2. Fixed the bad/orphan .TIC file support to handle .TIC files
with names longer than 8 characters.
3. Updated copyright notices to 2019.
v1.0.7.11 09-Oct-2018 - Andrew Leary
1. Fixed a bug that could truncate the tearline under certain

6
configure vendored
View File

@ -2309,10 +2309,10 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbutils mbnntp mbtask mbsetup unix lang
PACKAGE="mbsebbs"
MAJOR="1"
MINOR="0"
REVISION="7.11"
REVISION="7.12"
VERSION="$MAJOR.$MINOR.$REVISION"
COPYRIGHT="Copyright (C) 1997-2018 MBSE Development Team, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2018 MBSE DevTm"
COPYRIGHT="Copyright (C) 1997-2019 MBSE Development Team, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2019 MBSE DevTm"
GROUP="bbs"
OWNER="mbse"
ROWNER="`id -un root`"

View File

@ -12,10 +12,10 @@ AC_SUBST(SUBDIRS)
PACKAGE="mbsebbs"
MAJOR="1"
MINOR="0"
REVISION="7.11"
REVISION="7.12"
VERSION="$MAJOR.$MINOR.$REVISION"
COPYRIGHT="Copyright (C) 1997-2018 MBSE Development Team, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2018 MBSE DevTm"
COPYRIGHT="Copyright (C) 1997-2019 MBSE Development Team, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2019 MBSE DevTm"
GROUP="bbs"
OWNER="mbse"
ROWNER="`id -un root`"

View File

@ -1167,6 +1167,7 @@ TrType binkp_receiver(void)
bp.rtime = atoi(strtok(NULL, " \n\r"));
bp.roffs = atoi(strtok(NULL, " \n\r"));
snprintf(bp.ropts, 512, "%s", printable(strtok(NULL, " \n\r\0"), 0));
if (strcmp((char *)"GZ", bp.ropts) == 0)
bp.rmode = CompGZ;
else if (strcmp((char *)"BZ2", bp.ropts) == 0)
@ -1194,6 +1195,15 @@ TrType binkp_receiver(void)
Syslog('+', "Binkp: receive file \"%s\" date %s size %ld offset %ld comp %s",
bp.rname, date(bp.rtime), bp.rsize, bp.roffs, cpstate[bp.rmode]);
if (!bp.rsize) {
Syslog('+', "Binkp: 0 byte file %s, sending M_GOT", bp.rname);
bp.RxState = RxWaitF;
rc = binkp_send_command(MM_GOT, "%s %ld %ld", bp.rname, bp.rsize, bp.rtime);
if (rc)
return Failure;
else
return Ok;
}
if (bp.roffs == -1) {
/*
* Even without NR mode Taurus sends as if it's in NR mode.

View File

@ -53,7 +53,7 @@ void fill_orphans(orphans **qal, char *TicName, char *Area, char *FileName, int
tmp = (orphans *)malloc(sizeof(orphans));
tmp->next = *qal;
snprintf(tmp->TicName, 13, TicName);
snprintf(tmp->TicName, 51, TicName);
snprintf(tmp->Area, 21, Area);
snprintf(tmp->FileName, 81, FileName);
tmp->Orphaned = Orphaned;

View File

@ -8,7 +8,7 @@
*/
typedef struct _orphans {
struct _orphans *next; /* Linked list */
char TicName[13]; /* TIC filename */
char TicName[51]; /* TIC filename */
char Area[21]; /* TIC area */
char FileName[81]; /* TIC filename */
unsigned Orphaned : 1; /* Real orphaned file */

View File

@ -227,7 +227,7 @@ int LoadTic(char *inb, char *tfn, orphans **opl)
memset(&T_File, 0, sizeof(T_File));
snprintf(TIC.Inbound, PATH_MAX, "%s", inb);
strncpy(TIC.TicName, tfn, 12);
strncpy(TIC.TicName, tfn, 50);
chdir(inb);
if ((tfp = fopen(tfn, "r")) == NULL) {

View File

@ -35,7 +35,7 @@ typedef struct _tic_in {
typedef struct _TICrec {
char Inbound[PATH_MAX+1]; /* Inbound directory */
char TicName[13]; /* Name of .TIC file */
char TicName[51]; /* Name of .TIC file */
Tic_in TicIn; /* Original TIC record */
fidoaddr OrgAka; /* Origin address */
fidoaddr Aka; /* An address ? */