OSDN Git Service

android/daemon: Fix error setting property
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Thu, 31 Oct 2013 11:52:38 +0000 (13:52 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 31 Oct 2013 13:44:43 +0000 (15:44 +0200)
Do not return error setting property which is already set. This fixes
bug with set_scan_mode which might return HAL_STATUS_DONE.

android/adapter.c

index a3f9aa6..7baf356 100644 (file)
@@ -943,7 +943,7 @@ void bt_adapter_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf,
                break;
        case HAL_OP_SET_ADAPTER_PROP:
                status = set_property(buf, len);
-               if (status != HAL_STATUS_SUCCESS)
+               if (status != HAL_STATUS_SUCCESS && status != HAL_STATUS_DONE)
                        goto error;
 
                break;