linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Add DBG() calls to authorization logic
@ 2012-04-14  5:16 chanyeol.park
  2012-04-14 16:01 ` Marcel Holtmann
  0 siblings, 1 reply; 11+ messages in thread
From: chanyeol.park @ 2012-04-14  5:16 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: chanyeol.park

From: Chan-yeol Park <chanyeol.park@samsung.com>

Sometimes BlueZ Agent is disappear suddenly or not registered
because of agent problem. but Bluez just prints "Operation Not
permiited"

This will help debugging.
---
 audio/manager.c |    2 +-
 src/adapter.c   |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/audio/manager.c b/audio/manager.c
index aa2547c..20453e6 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -604,7 +604,7 @@ static void hf_io_cb(GIOChannel *chan, gpointer data)
 	perr = audio_device_request_authorization(device, server_uuid,
 						gateway_auth_cb, device);
 	if (perr < 0) {
-		DBG("Authorization denied!");
+		DBG("Authorization denied: %s", strerror(-perr));
 		gateway_set_state(device, GATEWAY_STATE_DISCONNECTED);
 	}
 
diff --git a/src/adapter.c b/src/adapter.c
index d10db10..15d502f 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -3107,6 +3107,7 @@ static int adapter_authorize(struct btd_adapter *adapter, const bdaddr_t *dst,
 
 	agent = device_get_agent(device);
 	if (!agent) {
+		DBG("Can't find device agent");
 		g_free(auth);
 		return -EPERM;
 	}
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-04-16 19:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-14  5:16 [PATCH 1/1] Add DBG() calls to authorization logic chanyeol.park
2012-04-14 16:01 ` Marcel Holtmann
2012-04-16  6:22   ` chanyeol.park
2012-04-16  7:50     ` Marcel Holtmann
2012-04-16  8:26       ` [PATCH 1/2] Add function for printing warnings chanyeol.park
2012-04-16  8:36         ` Marcel Holtmann
2012-04-16 11:56           ` [PATCH v2 1/3] src: " chanyeol.park
2012-04-16 19:55             ` Johan Hedberg
2012-04-16 11:56           ` [PATCH v2 2/3] adapter: Add warning if there is no authorization agent chanyeol.park
2012-04-16 11:56           ` [PATCH v2 3/3] audio: Add missing debug message in authorization chanyeol.park
2012-04-16  8:27       ` [PATCH 2/2] Add warning if there is no authorization agent chanyeol.park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).