Commit 7c499d47af275d3596fc84aaf37391f99174e97b
1 parent
c007710c
Exists in
master
and in
3 other branches
Working on windows IPC module.
Showing
1 changed file
with
16 additions
and
2 deletions
Show diff stats
src/lib3270++/windows/session.cc
| @@ -92,7 +92,7 @@ | @@ -92,7 +92,7 @@ | ||
| 92 | IPC::Request & IPC::Request::call() { | 92 | IPC::Request & IPC::Request::call() { |
| 93 | 93 | ||
| 94 | #ifdef DEBUG | 94 | #ifdef DEBUG |
| 95 | - lib3270_trace_data(NULL,"Request block",(const char *) this->out.block, this->out.used); | 95 | + // lib3270_trace_data(NULL,"Request block",(const char *) this->out.block, this->out.used); |
| 96 | #endif // DEBUG | 96 | #endif // DEBUG |
| 97 | 97 | ||
| 98 | in.current = 0; | 98 | in.current = 0; |
| @@ -111,10 +111,24 @@ | @@ -111,10 +111,24 @@ | ||
| 111 | 111 | ||
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | + debug("Received response \"", in.block, "\" with ", in.used, " bytes"); | ||
| 114 | #ifdef DEBUG | 115 | #ifdef DEBUG |
| 115 | - lib3270_trace_data(NULL,"Response block",(const char *) this->in.block, this->in.used); | 116 | + // lib3270_trace_data(NULL,"Response block",(const char *) this->in.block, this->in.used); |
| 116 | #endif // DEBUG | 117 | #endif // DEBUG |
| 117 | 118 | ||
| 119 | + // Extract response name | ||
| 120 | + in.current = strlen((const char *) in.block)+1; | ||
| 121 | + | ||
| 122 | + // Extract return code | ||
| 123 | + uint16_t rc = *((uint16_t *) (in.block + in.current)); | ||
| 124 | + in.current += sizeof(uint16_t); | ||
| 125 | + | ||
| 126 | + // Extract argc | ||
| 127 | + uint16_t argc = *((uint16_t *) (in.block + in.current)); | ||
| 128 | + in.current += sizeof(uint16_t); | ||
| 129 | + | ||
| 130 | + debug("Received response \"", ((const char *) in.block), "\" with rc=", rc, " and ", argc, " arguments"); | ||
| 131 | + | ||
| 118 | return *this; | 132 | return *this; |
| 119 | } | 133 | } |
| 120 | 134 |