CAPI/NAP: unset nap function check the right callback 42/24742/1
authorWu Jiangbo <jiangbox.wu@intel.com>
Mon, 21 Jul 2014 06:00:23 +0000 (14:00 +0800)
committerWu Jiangbo <jiangbox.wu@intel.com>
Mon, 21 Jul 2014 06:06:07 +0000 (14:06 +0800)
Change-Id: I5ccaa3ea59997233890c66a7b55fc2ab443ec5e7
Signed-off-by: Wu Jiangbo <jiangbox.wu@intel.com>
capi/bluetooth.c

index f211956..e351659 100644 (file)
@@ -1194,6 +1194,8 @@ int bt_adapter_set_name_changed_cb(bt_adapter_name_changed_cb callback,
 {
        struct adapter_name_cb_node *node_data;
 
+       DBG("");
+
        if (callback == NULL)
                return BT_ERROR_INVALID_PARAMETER;
 
@@ -5235,7 +5237,7 @@ int bt_nap_unset_connection_state_changed_cb(void)
        if (default_adapter == NULL)
                return BT_ERROR_ADAPTER_NOT_FOUND;
 
-       if (!adapter_name_node)
+       if (!nap_connection_state_changed_node)
                return BT_SUCCESS;
 
        bluez_unset_nap_connection_state_cb();