Fixed binkp deadlock on some arches (aarch64)
This commit is contained in:
commit
34daba8a0e
@ -124,7 +124,7 @@ int binkp_loop(s_binkp_state *bstate) {
|
||||
bstate->continuesend = false;
|
||||
}
|
||||
|
||||
if (have_to_write==0 && (!no_more_to_send || bstate->extracmd[0]!=-1)) {
|
||||
if (have_to_write==0 && (!no_more_to_send || bstate->extracmd[0]!=(char)-1)) {
|
||||
m = binkp_getforsend(bstate, writebuf+BINKP_HEADER, &block_type, &block_length);
|
||||
if(m==1 || m==3) {
|
||||
//DEB((D_24554, "got block for sending %d %hu", block_type, block_length));
|
||||
@ -340,7 +340,7 @@ int binkp_getforsend(s_binkp_state *bstate, char *buf, int *block_type, unsigned
|
||||
{
|
||||
int my_sf, wr_pos;
|
||||
int n; // read file
|
||||
if (bstate->extracmd[0]!=-1) {
|
||||
if (bstate->extracmd[0]!=(char)-1) {
|
||||
DEB((D_24554, "Send cmd to remote %d %s", bstate->extracmd[0], bstate->extracmd+1));
|
||||
buf[0] = bstate->extracmd[0];
|
||||
strcpy(buf+1, bstate->extracmd+1);
|
||||
@ -954,7 +954,7 @@ case BPMSG_GET: /* Get a file from offset */
|
||||
}
|
||||
DEB((D_24554, "M_GET file %s size %d time %d offset %d", getfi.fn, getfi.sz, getfi.tm, getfi.offs));
|
||||
|
||||
if (bstate->extracmd[0] != -1) return 0;
|
||||
if (bstate->extracmd[0] != (char)-1) return 0;
|
||||
|
||||
if (bstate->pi->send) if (p_compfinfo(bstate->pi->send, getfi.fn, getfi.sz, getfi.tm)==0) {
|
||||
DEB((D_24554, "M_GET for currently transmitted file"));
|
||||
@ -1044,7 +1044,7 @@ case BINKP_BLK_DATA:
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (bstate->extracmd[0] != -1) return 0;
|
||||
if (bstate->extracmd[0] != (char)-1) return 0;
|
||||
|
||||
long int n;
|
||||
n = p_rx_writefile(buf, block_length, bstate->pi);
|
||||
|
Loading…
x
Reference in New Issue
Block a user