[sheepdog] [PATCH] lib/sheep.c: fix return value of sd_run_sdreq()

Yu Yang justyuyang at foxmail.com
Thu May 14 09:12:35 CEST 2015


From: Yu Yang <yuyang at cmss.chinamobile.com>

The return value should be SD_RES_XXX, so return SD_RES_SYSTEM_ERROR
when sheep_submit_sdreq() failed.

Signed-off-by: Yu Yang <yuyang at cmss.chinamobile.com>
---
 lib/shared/sheep.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/shared/sheep.c b/lib/shared/sheep.c
index 933be07..a632162 100644
--- a/lib/shared/sheep.c
+++ b/lib/shared/sheep.c
@@ -86,7 +86,7 @@ int sd_run_sdreq(struct sd_cluster *c, struct sd_req *hdr, void *data)
 
 	ret = sheep_submit_sdreq(c, hdr, data, wlen);
 	if (ret < 0)
-		return ret;
+		return SD_RES_SYSTEM_ERROR;
 
 	ret = xread(c->sockfd, rsp, sizeof(*rsp));
 	if (ret < 0)
-- 
1.7.9.5





More information about the sheepdog mailing list