Diff between 5bea37807efb201364b1193a88789b640be03faf and 99292329e06ea428a7a98e6ced8efe81e9453629
Changed Files
| File | Additions | Deletions | Status |
| src/advertising.c | +7 | -1 | modified |
Full Patch
diff --git a/src/advertising.c b/src/advertising.c
index 46de9b4..7d69ee1 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -402,7 +402,13 @@ static void add_advertising_callback(uint8_t status, uint16_t length,
const struct mgmt_rp_add_advertising *rp = param;
if (status || !param) {
- error("Failed to add advertising MGMT");
+ error("Failed to add advertisement: %s (0x%02x)",
+ mgmt_errstr(status), status);
+ return;
+ }
+
+ if (length < sizeof(*rp)) {
+ error("Wrong size of add advertising response");
return;
}