diff options
Diffstat (limited to 'src/protocol/reqrep')
| -rw-r--r-- | src/protocol/reqrep/rep.c | 3 | ||||
| -rw-r--r-- | src/protocol/reqrep/req.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/protocol/reqrep/rep.c b/src/protocol/reqrep/rep.c index 60346390..96413523 100644 --- a/src/protocol/reqrep/rep.c +++ b/src/protocol/reqrep/rep.c @@ -263,7 +263,7 @@ nni_rep_pipe_recv(void *arg) for (;;) { size_t len; - char *body; + uint8_t *body; int hops; again: @@ -299,6 +299,7 @@ again: goto again; } nni_msg_trim(msg, 4); + body = nni_msg_body(msg, &len); if (end) { break; } diff --git a/src/protocol/reqrep/req.c b/src/protocol/reqrep/req.c index b8401107..9cfc6f54 100644 --- a/src/protocol/reqrep/req.c +++ b/src/protocol/reqrep/req.c @@ -308,7 +308,6 @@ nni_req_sendfilter(void *arg, nni_msg *msg) { nni_req_sock *req = arg; uint32_t id; - uint8_t buf[4]; nni_mtx_lock(&req->mx); if (req->raw) { @@ -329,7 +328,7 @@ nni_req_sendfilter(void *arg, nni_msg *msg) req->reqid[2] = (uint8_t) (id >> 8); req->reqid[3] = (uint8_t) (id); - if (nni_msg_append_header(msg, buf, 4) != 0) { + if (nni_msg_append_header(msg, req->reqid, 4) != 0) { // Should be ENOMEM. nni_mtx_unlock(&req->mx); nni_msg_free(msg); |
