[sheepdog] [PATCH stable-0.7 3/3] dog: fix send_light_req

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Thu Aug 22 10:19:01 CEST 2013


From: Liu Yuan <namei.unix at gmail.com>

This patch fixes segfault of many dog commands due to commit a4d01de

Signed-off-by: Liu Yuan <namei.unix at gmail.com>
Reviewed-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 dog/common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dog/common.c b/dog/common.c
index 301b8bf..b185d4e 100644
--- a/dog/common.c
+++ b/dog/common.c
@@ -202,7 +202,7 @@ int dog_exec_req(const uint8_t *addr, int port, struct sd_req *hdr,
 int send_light_req(struct sd_req *hdr, const uint8_t *addr, int port)
 {
 	int ret = dog_exec_req(addr, port, hdr, NULL);
-	struct sd_rsp *rsp = (struct sd_rsp *)&hdr;
+	struct sd_rsp *rsp = (struct sd_rsp *)hdr;
 
 	if (ret == -1)
 		return -1;
-- 
1.7.10.4




More information about the sheepdog mailing list