From f645f1a8e625b36f5eb4f2209cc131eb72f0f05b Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Thu, 25 Dec 2003 12:44:16 +0000 Subject: [PATCH] Binkp update to allow extra m_file command --- ChangeLog | 3 ++- mbcico/binkp.c | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f54337bc..cf0020c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,13 +2,14 @@ $Id$ v0.39.5 24-Dec-2003 - mbcico: Binkp code cleanup. + Allow m_file command in binkp during file transfer in progress. script: Fixed NetBSD init script + v0.39.4 08-Dec-2003 - 24-Dec-2003 general: diff --git a/mbcico/binkp.c b/mbcico/binkp.c index 6556e5b0..9dd680c4 100644 --- a/mbcico/binkp.c +++ b/mbcico/binkp.c @@ -1491,6 +1491,19 @@ int binkp_batch(file_list *to_send) break; case MM_FILE: Syslog('b', "Binkp: got FILE: %s", bp.rxbuf+1); + if (bp.RxState == RxReceData ) { + /* + * If we get a m_file command during receive, the current file is + * considered interrupted. Save the partial received file and accept + * the new file. After this file the transmitter should continue + * with the original file and this mailer should send m_get to set + * the offset to the point were we left off. + */ + Syslog('+', "Binkp: new file during receive, saving %s", bp.rname); + closefile(); + bp.rxfp = NULL; + bp.RxState = RxWaitFile; + } if ((bp.RxState == RxWaitFile) || (bp.RxState == RxEndOfBatch)) { bp.RxState = RxAcceptFile; /*