aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2012-06-13 16:03:53 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-13 17:54:44 +0300
commit00372cde4dc5b311e7142d0f43e8f343ce1dc210 (patch)
treeded398cf82a0cf3c3282ee2c8c8f18ddbcdd8fdb
parent4da87e3e2b9facfb92448b690c8593dd4b5a0277 (diff)
downloadbluez-00372cde4dc5b311e7142d0f43e8f343ce1dc210.tar.gz
bluez-00372cde4dc5b311e7142d0f43e8f343ce1dc210.tar.xz
bluez-00372cde4dc5b311e7142d0f43e8f343ce1dc210.zip
mgmtops: Move error message after command status handlers calls
Don't print error message for actions that are expected or recoverable i.e. add_uuid returning EBUSY status.
-rw-r--r--plugins/mgmtops.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c
index 4ce3ee4e..ea1552d3 100644
--- a/plugins/mgmtops.c
+++ b/plugins/mgmtops.c
@@ -1470,19 +1470,21 @@ static void mgmt_cmd_status(int sk, uint16_t index, void *buf, size_t len)
return;
}
- error("hci%u: %s (0x%04x) failed: %s (0x%02x)", index,
- mgmt_opstr(opcode), opcode, mgmt_errstr(ev->status),
- ev->status);
-
switch (opcode) {
case MGMT_OP_READ_LOCAL_OOB_DATA:
read_local_oob_data_failed(sk, index);
break;
case MGMT_OP_ADD_UUID:
- if (ev->status == MGMT_STATUS_BUSY)
+ if (ev->status == MGMT_STATUS_BUSY) {
mgmt_add_uuid_busy(sk, index);
+ return;
+ }
break;
}
+
+ error("hci%u: %s (0x%04x) failed: %s (0x%02x)", index,
+ mgmt_opstr(opcode), opcode, mgmt_errstr(ev->status),
+ ev->status);
}
static void mgmt_controller_error(int sk, uint16_t index, void *buf, size_t len)