test fix for binkp sz and call entry

This commit is contained in:
Alexey Khromov 2025-03-19 21:17:28 +03:00
parent 7fd0d85557
commit 324b11aad7
2 changed files with 8 additions and 7 deletions

View File

@ -95,12 +95,12 @@ int binkp_loop(s_binkp_state *bstate) {
bstate->emptyloop = 0;
bstate->continuesend = false;
unsigned short read_pos=0;
unsigned short read_blklen=0;
unsigned short want_read=BINKP_HEADER;
uint16_t read_pos=0;
uint16_t read_blklen=0;
uint16_t want_read=BINKP_HEADER;
unsigned short write_pos=0;
unsigned short have_to_write=0;
uint16_t write_pos=0;
uint16_t have_to_write=0;
int n, m;
bool no_more_to_send = false;
@ -217,7 +217,7 @@ int binkp_loop(s_binkp_state *bstate) {
if (read_pos == BINKP_HEADER) {
// have read header, want read body
DEB((D_24554, "it should be 0: %d", want_read));
want_read = ((unsigned short)(readbuf[0]&0x7F)<<8) | readbuf[1];
want_read = ((uint16_t)(readbuf[0]&0x7F)<<8) | (uint16_t)readbuf[1];
DEB((D_24554, "got block header, block length %u", want_read));
} // no else here: if want_read may be zero here for zero length block
}

View File

@ -481,7 +481,7 @@ int call_system_tcpip(int callwith) // only TCPIP values
char abuf[BF_MAXADDRSTR+1];
int rc = BFERR_NOERROR;
char * pbuf;
char * target;
char * target = 0;
int resflg;
/*
* Set verbal line name to "tcpip" value
@ -542,6 +542,7 @@ defalt:
{
target = strchr(p, ',');
if ( target ) target[0] = '\0';
target = 0;
target = strrchr(p, ':');
if ( target ) {
target++;