summaryrefslogtreecommitdiff
path: root/android/pan.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2014-05-14 16:30:48 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-05-14 16:30:48 +0200
commit37831ea5139fe14a3276b676aa7cbc66569563bd (patch)
treeb6da9b357047e597a907573b2cb6af9cf384bac0 /android/pan.c
parenta5703d66d94d3f0f1796658276f012ad42caf726 (diff)
downloadbluez-37831ea5139fe14a3276b676aa7cbc66569563bd.tar.gz
android/pan: Print error if failed to create bridge
Diffstat (limited to 'android/pan.c')
-rw-r--r--android/pan.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/android/pan.c b/android/pan.c
index 3bcab57dc..9eab93209 100644
--- a/android/pan.c
+++ b/android/pan.c
@@ -468,7 +468,7 @@ static gboolean nap_setup_cb(GIOChannel *chan, GIOCondition cond,
uint8_t packet[BNEP_MTU];
struct bnep_setup_conn_req *req = (void *) packet;
uint16_t src_role, dst_role, rsp = BNEP_CONN_NOT_ALLOWED;
- int sk, n;
+ int sk, n, err;
if (cond & (G_IO_ERR | G_IO_HUP | G_IO_NVAL)) {
error("Hangup or error or inval on BNEP socket");
@@ -511,8 +511,12 @@ static gboolean nap_setup_cb(GIOChannel *chan, GIOCondition cond,
goto failed;
}
- if (nap_create_bridge() < 0)
+ err = nap_create_bridge();
+ if (err < 0) {
+ error("pan: Failed to create bridge: %s (%d)", strerror(-err),
+ -err);
goto failed;
+ }
if (bnep_server_add(sk, dst_role, BNEP_BRIDGE, dev->iface,
&dev->dst) < 0) {