Diff between a5703d66d94d3f0f1796658276f012ad42caf726 and 37831ea5139fe14a3276b676aa7cbc66569563bd

Changed Files

File Additions Deletions Status
android/pan.c +6 -2 modified

Full Patch

diff --git a/android/pan.c b/android/pan.c
index 3bcab57..9eab932 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) {