From 9c4a1ddcc53f634e6465b7ac944356cd51334f96 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Mon, 26 Jan 2004 13:32:47 +0000 Subject: [PATCH] Fixed resync --- mbcico/binkp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mbcico/binkp.c b/mbcico/binkp.c index a97631c6..5ced33d2 100644 --- a/mbcico/binkp.c +++ b/mbcico/binkp.c @@ -216,6 +216,7 @@ int binkp(int role) #ifdef USE_NEWBINKP most_debug = TRUE; #endif +most_debug = TRUE; Syslog('+', "Binkp: start session"); @@ -1186,6 +1187,15 @@ TrType binkp_receiver(void) return Ok; } } else if (bp.RxState == RxWriteD) { + if (bp.rxfp == NULL) { + Syslog('b', "Binkp: file is closed, ignore data"); + bp.GotFrame = FALSE; + bp.rxlen = 0; + bp.header = 0; + bp.RxState = RxReceD; + return Ok; + } + written = fwrite(bp.rxbuf, 1, bp.blklen, bp.rxfp); bp.GotFrame = FALSE;