diff --git a/source/bforce/prot_binkp.c b/source/bforce/prot_binkp.c index c3d0e6a..3604b69 100644 --- a/source/bforce/prot_binkp.c +++ b/source/bforce/prot_binkp.c @@ -740,7 +740,7 @@ case BPMSG_PWD: /* Session password */ /* Do authorization */ if( binkp_auth_incoming(bstate->remote_data) ) { log("error: invalid password"); - if( bstate->extracmd[0] !=-1 ) return 0; // suspend if extra is occupied + if( bstate->extracmd[0] != (char)-1 ) return 0; // suspend if extra is occupied bstate->extracmd[0] = BPMSG_ERR; strcpy(bstate->extracmd+1, "Security violation"); bstate->extraislast = true; @@ -749,7 +749,7 @@ case BPMSG_PWD: /* Session password */ // lock addresses if( session_addrs_lock(state.remoteaddrs, state.n_remoteaddr) ) { log("error locking addresses of the remote"); - if( bstate->extracmd[0] !=-1 ) return 0; // suspend if extra is occupied + if( bstate->extracmd[0] != (char)-1 ) return 0; // suspend if extra is occupied bstate->extracmd[0] = BPMSG_BSY; strcpy(bstate->extracmd+1, "All addresses are busy"); bstate->extraislast = true; @@ -770,6 +770,7 @@ case BPMSG_FILE: /* File information */ s_bpfinfo recvfi; if( binkp_parsfinfo(buf+1, &recvfi, true) ) { log ("M_FILE parse error: %s", buf + 1); + DEB((D_24554, "M_FILE parse error: %s", buf + 1 )); PROTO_ERROR("invalid M_FILE"); } bstate->batch_recv_count += 1; @@ -786,7 +787,7 @@ case BPMSG_FILE: /* File information */ return 1; } DEB((D_24554, "no, skipping; TODO: accept it")); - if( bstate->extracmd[0] != -1 ) return 0; + if( bstate->extracmd[0] != (char)-1 ) return 0; bstate->extracmd[0] = BPMSG_SKIP; sprintf(bstate->extracmd+1, "%s %ld %ld %ld", recvfi.fn, recvfi.sz, recvfi.tm, recvfi.offs); bstate->extraislast = false; @@ -798,7 +799,7 @@ case BPMSG_FILE: /* File information */ PROTO_ERROR("invalid mode for M_FILE"); } - if( bstate->extracmd[0] != -1 ) return 0; + if( bstate->extracmd[0] != (char)-1 ) return 0; switch(p_rx_fopen(bstate->pi, recvfi.fn, recvfi.sz, recvfi.tm, 0)) { case 0: if (bstate->pi->recv->bytes_skipped == recvfi.offs) {