From 31e5e927b9ae9619b5af343081f563a8e0d7bdc7 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 21 Dec 2012 09:50:12 +0200 Subject: [PATCH] network: Add debug logs to better follow the connection procedure --- profiles/network/connection.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/profiles/network/connection.c b/profiles/network/connection.c index 671478cc7..3a913cfc6 100644 --- a/profiles/network/connection.c +++ b/profiles/network/connection.c @@ -217,6 +217,8 @@ static gboolean bnep_setup_cb(GIOChannel *chan, GIOCondition cond, const char *path; DBusConnection *conn; + DBG("cond %u", cond); + if (cond & G_IO_NVAL) return FALSE; @@ -319,6 +321,8 @@ static int bnep_send_conn_req(struct network_conn *nc) unsigned char pkt[BNEP_MTU]; int fd; + DBG(""); + /* Send request */ req = (void *) pkt; req->type = BNEP_CONTROL; @@ -440,6 +444,8 @@ int connection_connect(struct btd_device *device, uint16_t id) const bdaddr_t *src; const bdaddr_t *dst; + DBG("id %u", id); + peer = find_peer(peers, device); if (!peer) return -ENOENT; @@ -681,6 +687,8 @@ int connection_register(struct btd_device *device, uint16_t id) struct network_peer *peer; struct network_conn *nc; + DBG("id %u", id); + peer = find_peer(peers, device); if (!peer) { peer = create_peer(device); @@ -700,6 +708,8 @@ int connection_register(struct btd_device *device, uint16_t id) nc->state = DISCONNECTED; nc->peer = peer; + DBG("id %u registered", id); + peer->connections = g_slist_append(peer->connections, nc); return 0; -- 2.47.3