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

@@ -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.