From: Jukka Rissanen Date: Thu, 5 Apr 2012 09:04:07 +0000 (+0300) Subject: gweb: Add more debug prints when error happens X-Git-Tag: accepted/2.0alpha-wayland/20121110.002834~475 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0920acb99a94265bf33e6eca01ae78f7987c2ecd;p=profile%2Fivi%2Fconnman.git gweb: Add more debug prints when error happens These prints are useful when checking why network connection failed. --- diff --git a/gweb/gweb.c b/gweb/gweb.c index 5ec4fb1..3db5dc5 100644 --- a/gweb/gweb.c +++ b/gweb/gweb.c @@ -1019,6 +1019,7 @@ static int connect_session_transport(struct web_session *session) if (session->web->index > 0) { if (bind_socket(sk, session->web->index, session->addr->ai_family) < 0) { + debug(session->web, "bind() %s", strerror(errno)); close(sk); return -EIO; } @@ -1033,6 +1034,7 @@ static int connect_session_transport(struct web_session *session) } if (session->transport_channel == NULL) { + debug(session->web, "channel missing"); close(sk); return -ENOMEM; } @@ -1049,6 +1051,7 @@ static int connect_session_transport(struct web_session *session) if (connect(sk, session->addr->ai_addr, session->addr->ai_addrlen) < 0) { if (errno != EINPROGRESS) { + debug(session->web, "connect() %s", strerror(errno)); close(sk); return -EIO; }