OSDN Git Service

adapter: Add warning if there is no authorization agent
authorChan-yeol Park <chanyeol.park@samsung.com>
Mon, 16 Apr 2012 11:56:33 +0000 (20:56 +0900)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 16 Apr 2012 19:54:14 +0000 (22:54 +0300)
Sometimes BlueZ Agent is disappear suddenly or not registered
because of agent problem. but Bluez just prints "Operation Not
permiited"

This will help debugging.

src/adapter.c

index d9d7c19..12b6aeb 100644 (file)
@@ -3106,6 +3106,7 @@ static int adapter_authorize(struct btd_adapter *adapter, const bdaddr_t *dst,
 
        agent = device_get_agent(device);
        if (!agent) {
+               warn("Can't find device agent");
                g_free(auth);
                return -EPERM;
        }