From a39d8226556ce121b01099c063fd1c1af613c33d Mon Sep 17 00:00:00 2001 From: Sergey Dorofeev Date: Sun, 25 Mar 2012 14:57:25 +0400 Subject: [PATCH] Just a little mistake :) --- source/bforce/prot_binkp.c | 4 ++++ source/bforce/prot_common.c | 4 ++-- source/openwrt-conf | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/bforce/prot_binkp.c b/source/bforce/prot_binkp.c index 992446b..a75adb8 100644 --- a/source/bforce/prot_binkp.c +++ b/source/bforce/prot_binkp.c @@ -534,6 +534,7 @@ case 4: buf[0] = BPMSG_FILE; *block_length = 1+sprintf(buf+1, "%s %ld %ld -1", bstate->pi->send->net_name, (long)bstate->pi->send->bytes_total, (long)bstate->pi->send->mod_time); + DEB((D_24554, "M_FILE: %s", buf+1)); *block_type = BINKP_BLK_CMD; return 3; // no state change. phase would be changed to 1 by recv when M_GET is received } @@ -544,6 +545,7 @@ case 4: buf[0] = BPMSG_FILE; *block_length = 1+sprintf(buf+1, "%s %ld %ld 0", bstate->pi->send->net_name, bstate->pi->send->bytes_total, bstate->pi->send->mod_time); + DEB((D_24554, "M_FILE: %s", buf+1)); *block_type = BINKP_BLK_CMD; bstate->phase += 1; return 1; @@ -853,6 +855,8 @@ got_skip: PROTO_ERROR("error parsing M_GOT/M_SKIP"); } + DEB((D_24554, "params: fn=%s sz=%d tm=%d", fi.fn, fi.sz, fi.tm)); + if (strcmp (bstate->pi->send->net_name, fi.fn) == 0 && bstate->pi->send->status != FSTAT_WAITACK) { DEB((D_24554, "aborting current file")); if (bstate->pi->send->netspool) { diff --git a/source/bforce/prot_common.c b/source/bforce/prot_common.c index fe5af1a..6a1969f 100644 --- a/source/bforce/prot_common.c +++ b/source/bforce/prot_common.c @@ -254,9 +254,9 @@ int p_tx_fopen(s_protinfo *pi, s_filehint *hint) return 1; if (hint) { - DEB((D_OUTBOUND, "trying to reopen file %s size %d time %d", hint->fn, hint->sz, hint->tm)); + DEB((D_OUTBOUND, "trying to reopen file %s size %d time %d (nsent=%d)", hint->fn, hint->sz, hint->tm, pi->n_sentfiles)); int i; - for (i=0; i++; in_sentfiles) { + for (i=0; in_sentfiles; i++) { DEB((D_OUTBOUND, "check %s %d %d", pi->sentfiles[i].net_name, pi->sentfiles[i].bytes_total, pi->sentfiles[i].mod_time)); if (strcmp(pi->sentfiles[i].net_name, hint->fn)==0) { DEB((D_OUTBOUND, "name match")); diff --git a/source/openwrt-conf b/source/openwrt-conf index 4558c1b..0b64565 100755 --- a/source/openwrt-conf +++ b/source/openwrt-conf @@ -12,7 +12,6 @@ CC=$PREFIX-gcc export PATH CC CPP #make clean -#./configure --prefix=/opt/bforce --host=mips-openwrt-linux --disable-syslog --enable-netspool -#--with-logdir=/home/fido/log --with-spooldir=/home/fido/bforce +#./configure --prefix=/opt/bforce --host=mips-openwrt-linux --disable-syslog --enable-netspool --with-logdir=/home/fido/log --with-spooldir=/home/fido/bforce #make && scp bin/bforce root@gw-home:/opt/bforce/bin/bforce-new make && scp bin/bforce root@gw-home:/opt/bforce/bin/bforce \ No newline at end of file