git » nmdb » commit 8ffdb4d

Set the request ID as soon as possible.

author Alberto Bertogli
2007-06-01 00:22:14 UTC
committer Alberto Bertogli
2007-06-01 00:22:14 UTC
parent 7d1ee509d623ab336b0f05ea00d7139de3dd0127

Set the request ID as soon as possible.

Otherwise if we have a version mismatch, the error reply would go out
with an incorrect ID and might never reach destination.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

nmdb/tipc.c +1 -0

diff --git a/nmdb/tipc.c b/nmdb/tipc.c
index 576a707..eac6b60 100644
--- a/nmdb/tipc.c
+++ b/nmdb/tipc.c
@@ -345,6 +345,7 @@ static void parse_msg(struct req_info *req, unsigned char *buf, size_t bsize)
 	/* FIXME: little endian-only */
 	ver = (hdr & 0xF0000000) >> 28;
 	id = hdr & 0x0FFFFFFF;
+	req->id = id;
 
 	cmd = ntohl(* ((uint32_t *) buf + 1));