summaryrefslogtreecommitdiff
path: root/gweb
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2012-04-05 09:04:07 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-04-05 12:22:53 (GMT)
commit0920acb99a94265bf33e6eca01ae78f7987c2ecd (patch)
tree78ac9a8efc023e811c3e7480945cd2e218eee83d /gweb
parenta5193d7360e081436a21da3991b6eb268a8da42e (diff)
downloadconnman-0920acb99a94265bf33e6eca01ae78f7987c2ecd.zip
connman-0920acb99a94265bf33e6eca01ae78f7987c2ecd.tar.gz
connman-0920acb99a94265bf33e6eca01ae78f7987c2ecd.tar.bz2
gweb: Add more debug prints when error happens
These prints are useful when checking why network connection failed.
Diffstat (limited to 'gweb')
-rw-r--r--gweb/gweb.c3
1 files changed, 3 insertions, 0 deletions
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;
}