[Sheepdog] [PATCH] sheep: dprintf connection info in connect_to()

Yunkai Zhang yunkai.me at gmail.com
Thu May 10 11:15:10 CEST 2012


From: Yunkai Zhang <qiushu.zyk at taobao.com>

We have dprintfed the connection info which contains client's IP:PORT
in destroy_client(). Now, I dprintf the server's IP:PORT when sheep
calls connect_to(). These IP:PORT pair info can help me to analysis
network problem.

Signed-off-by: Yunkai Zhang <qiushu.zyk at taobao.com>
---
 lib/net.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/net.c b/lib/net.c
index dd34520..2727cf5 100644
--- a/lib/net.c
+++ b/lib/net.c
@@ -233,6 +233,7 @@ int connect_to(const char *name, int port)
 	fd = -1;
 success:
 	freeaddrinfo(res0);
+	dprintf("%d, %s:%d\n", fd, name, port);
 	return fd;
 }
 
-- 
1.7.7.6




More information about the sheepdog mailing list