bluetooth: Fix default adapter check
authorOlivier Guiter <olivier.guiter@linux.intel.com>
Thu, 6 Sep 2012 08:45:35 +0000 (10:45 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 7 Sep 2012 15:44:45 +0000 (17:44 +0200)
Check for def_adapter instead of bt_name.

src/bluetooth.c

index 1a4d4d1..3026335 100644 (file)
@@ -680,7 +680,7 @@ int __near_bluetooth_parse_oob_record(uint8_t version, uint8_t *bt_data,
 
        /* check and get the default adapter */
        oob->def_adapter = g_strdup(bt_def_oob_data.def_adapter);
-       if (oob->bt_name == NULL) {
+       if (oob->def_adapter == NULL) {
                near_error("bt_get_default_adapter failed");
                bt_eir_free(oob);
                return -EIO;