nwconn hex57 detial debug sub 6 detail
All checks were successful
Source release / source-package (push) Successful in 37s
All checks were successful
Source release / source-package (push) Successful in 37s
This commit is contained in:
26
src/nwconn.c
26
src/nwconn.c
@@ -152,13 +152,13 @@ static int ncp_response(int sequence, int task,
|
||||
int sub2 = (requestlen > 1) ? requestdata[1] : -1;
|
||||
int sub3 = (requestlen > 2) ? requestdata[2] : -1;
|
||||
XDPRINTF((2,0,
|
||||
"NS57F RESP compl=0x%x data_len=%d seq=%d task=%d sub1=0x%02x sub2=0x%02x sub3=0x%02x",
|
||||
"NS57S06 RESP compl=0x%x data_len=%d seq=%d task=%d sub1=0x%02x sub2=0x%02x sub3=0x%02x",
|
||||
(int)completition, data_len, (int)sequence, (int)task,
|
||||
sub1 & 0xff, sub2 & 0xff, sub3 & 0xff));
|
||||
if (sub1 == 0x03 || sub1 == 0x06) {
|
||||
if (sub1 == 0x06) {
|
||||
XDPRINTF((2,0,
|
||||
"NS57F TARGET RESP sub1=0x%02x compl=0x%x data_len=%d",
|
||||
sub1 & 0xff, (int)completition, data_len));
|
||||
"NS57S06 TARGET RESP compl=0x%x data_len=%d sub2=0x%02x sub3=0x%02x",
|
||||
(int)completition, data_len, sub2 & 0xff, sub3 & 0xff));
|
||||
}
|
||||
}
|
||||
ud.udata.len = ud.udata.maxlen = sizeof(NCPRESPONSE) + data_len;
|
||||
@@ -206,7 +206,7 @@ static int call_nwbind(int mode)
|
||||
}
|
||||
|
||||
|
||||
static void debug_ns57_request_focus(uint8 *data, int len)
|
||||
static void debug_ns57_sub06_focus(uint8 *data, int len)
|
||||
{
|
||||
int sub1 = (len > 0) ? data[0] : -1;
|
||||
int sub2 = (len > 1) ? data[1] : -1;
|
||||
@@ -214,8 +214,8 @@ static void debug_ns57_request_focus(uint8 *data, int len)
|
||||
char ascii[260];
|
||||
int i, shown = len;
|
||||
|
||||
if (shown > 180)
|
||||
shown = 180;
|
||||
if (shown > 200)
|
||||
shown = 200;
|
||||
if (shown < 0)
|
||||
shown = 0;
|
||||
|
||||
@@ -226,14 +226,14 @@ static void debug_ns57_request_focus(uint8 *data, int len)
|
||||
ascii[(shown < (int)sizeof(ascii) - 1) ? shown : ((int)sizeof(ascii) - 1)] = '\0';
|
||||
|
||||
XDPRINTF((2,0,
|
||||
"NS57F ENTER len=%d sub1=0x%02x sub2=0x%02x sub3=0x%02x task=%d ascii='%s'",
|
||||
"NS57S06 ENTER len=%d sub1=0x%02x sub2=0x%02x sub3=0x%02x task=%d ascii='%s'",
|
||||
len, sub1 & 0xff, sub2 & 0xff, sub3 & 0xff,
|
||||
(int)ncprequest->task, ascii));
|
||||
|
||||
if (data && len > 0) {
|
||||
int j = len;
|
||||
uint8 *p = data;
|
||||
XDPRINTF((2,2,"NS57F HEX len %d, DATA:", j));
|
||||
XDPRINTF((2,2,"NS57S06 HEX len %d, DATA:", j));
|
||||
while (j--) {
|
||||
int c = *p++;
|
||||
if (c > 32 && c < 127)
|
||||
@@ -244,10 +244,10 @@ static void debug_ns57_request_focus(uint8 *data, int len)
|
||||
XDPRINTF((2,1,NULL));
|
||||
}
|
||||
|
||||
if (sub1 == 0x03 || sub1 == 0x06) {
|
||||
if (sub1 == 0x06) {
|
||||
XDPRINTF((2,0,
|
||||
"NS57F TARGET sub1=0x%02x len=%d maybe_open_or_lookup=1",
|
||||
sub1 & 0xff, len));
|
||||
"NS57S06 TARGET len=%d sub2=0x%02x sub3=0x%02x",
|
||||
len, sub2 & 0xff, sub3 & 0xff));
|
||||
}
|
||||
}
|
||||
static void pr_debug_request()
|
||||
@@ -368,7 +368,7 @@ static int handle_ncp_serv(void)
|
||||
if (nw_debug > 5) pr_debug_request();
|
||||
|
||||
if (function == 0x57) {
|
||||
debug_ns57_request_focus(requestdata, requestlen);
|
||||
debug_ns57_sub06_focus(requestdata, requestlen);
|
||||
}
|
||||
|
||||
if (ncp_type == 0x2222) {
|
||||
|
||||
Reference in New Issue
Block a user