Skip to content

Commit

Permalink
sheep/request: fix bug of inconsistency between data_length and data
Browse files Browse the repository at this point in the history
When log admin ops in rx_main, it should use req->rq.data_length
rather than req->rp.data_length. If not, we will always get "not
string" because of req->rp.data_length equals zero.

Signed-off-by: Meng Lingkun <menglingkun@cmss.chinamobile.com>
(cherry picked from commit b16b207)
  • Loading branch information
Meng Lingkun authored and tmenjo committed Jul 15, 2016
1 parent c716f01 commit da3e7a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sheep/request.c
Expand Up @@ -827,7 +827,7 @@ static void rx_main(struct work *work)
ci->conn.fd,
ci->conn.ipstr, ci->conn.port,
op_name(get_sd_op(req->rq.opcode)),
data_to_str(req->data, req->rp.data_length));
data_to_str(req->data, req->rq.data_length));
} else {
sd_debug("%d, %s:%d",
ci->conn.fd,
Expand Down

0 comments on commit da3e7a9

Please sign in to comment.