[sheepdog] [v2] sheep/request.c: fix bug of parameter passing in listen_handler

Meng Lingkun menglingkun at cmss.chinamobile.com
Mon May 18 11:27:28 CEST 2015


Because struct client_info doesn't contain member cluster_info,
there is no need to retain parameter client_info for
create_client.

Signed-off-by: Meng Lingkun <menglingkun at cmss.chinamobile.com>
---
 sheep/request.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sheep/request.c b/sheep/request.c
index f12ca6b..43b8c85 100644
--- a/sheep/request.c
+++ b/sheep/request.c
@@ -944,7 +944,7 @@ static void clear_client_info(struct client_info *ci)
 	destroy_client(ci);
 }
 
-static struct client_info *create_client(int fd, struct cluster_info *cluster)
+static struct client_info *create_client(int fd)
 {
 	struct client_info *ci;
 	struct sockaddr_storage from;
@@ -1070,7 +1070,7 @@ static void listen_handler(int listen_fd, int events, void *data)
 		}
 	}
 
-	ci = create_client(fd, data);
+	ci = create_client(fd);
 	if (!ci) {
 		close(fd);
 		return;
-- 
1.7.1





More information about the sheepdog mailing list