OSDN Git Service

neard: Use ENONET error when adapter is not enabled
authorSzymon Janc <szymon.janc@tieto.com>
Mon, 19 Nov 2012 15:03:55 +0000 (16:03 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Tue, 20 Nov 2012 10:22:17 +0000 (12:22 +0200)
This results in returning error 'Disabled' instead of 'No such Device'.
Will allow neard to properly set power state of Bluetooth carrier.

plugins/neard.c

index 8f8381c..1576be5 100644 (file)
@@ -380,7 +380,7 @@ static int check_adapter(struct btd_adapter *adapter)
        btd_adapter_get_mode(adapter, NULL, NULL, &pairable);
 
        if (!pairable || !adapter_get_agent(adapter))
-               return -ENOENT;
+               return -ENONET;
 
        if (!btd_adapter_ssp_enabled(adapter))
                return -ENOTSUP;