mgmtops: Improve event size mismatch messages

This makes them consistent, and updates the function names.
This commit is contained in:
Anderson Lizardo 2012-02-13 09:12:25 -04:00 committed by Johan Hedberg
parent 80e106f409
commit 92f9870934

View File

@ -367,7 +367,7 @@ static void mgmt_new_link_key(int sk, uint16_t index, void *buf, size_t len)
struct controller_info *info;
if (len != sizeof(*ev)) {
error("new_key event size mismatch (%zu != %zu)",
error("mgmt_new_link_key event size mismatch (%zu != %zu)",
len, sizeof(*ev));
return;
}
@ -1071,7 +1071,8 @@ static void read_local_oob_data_complete(int sk, uint16_t index, void *buf,
struct btd_adapter *adapter;
if (len != sizeof(*rp)) {
error("Wrong read_local_oob_data_complete event size");
error("read_local_oob_data_complete event size mismatch "
"(%zu != %zu)", len, sizeof(*rp));
return;
}
@ -1313,7 +1314,7 @@ static void mgmt_device_found(int sk, uint16_t index, void *buf, size_t len)
eir_len = bt_get_le16(&ev->eir_len);
if (len != sizeof(*ev) + eir_len) {
error("mgmt_device_found length %zu instead of expected %zu",
error("mgmt_device_found event size mismatch (%zu != %zu)",
len, sizeof(*ev) + eir_len);
return;
}
@ -1445,7 +1446,7 @@ static void mgmt_new_ltk(int sk, uint16_t index, void *buf, size_t len)
struct controller_info *info;
if (len != sizeof(*ev)) {
error("new_smp_key event size mismatch (%zu != %zu)",
error("mgmt_new_ltk event size mismatch (%zu != %zu)",
len, sizeof(*ev));
return;
}