mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
send notify
This commit is contained in:
parent
c7565d3069
commit
b9b3efe350
1 changed files with 11 additions and 0 deletions
|
@ -540,6 +540,8 @@ static int hostapd_notify(struct ubus_context *ctx, struct ubus_object *obj,
|
||||||
|
|
||||||
// TODO: Only handle probe request and NOT assoc, ...
|
// TODO: Only handle probe request and NOT assoc, ...
|
||||||
|
|
||||||
|
respond_to_notify(req->peer);
|
||||||
|
|
||||||
if (strncmp(method, "probe", 5) == 0) {
|
if (strncmp(method, "probe", 5) == 0) {
|
||||||
return handle_probe_req(msg);
|
return handle_probe_req(msg);
|
||||||
} else if (strncmp(method, "auth", 4) == 0) {
|
} else if (strncmp(method, "auth", 4) == 0) {
|
||||||
|
@ -972,3 +974,12 @@ static void ubus_add_oject()
|
||||||
fprintf(stderr, "Failed to add watch handler: %s\n", ubus_strerror(ret));
|
fprintf(stderr, "Failed to add watch handler: %s\n", ubus_strerror(ret));
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void respond_to_notify(uint32_t id) {
|
||||||
|
blob_buf_init(&b, 0);
|
||||||
|
blobmsg_add_u32(&b, "notify_response", 1234);
|
||||||
|
|
||||||
|
int timeout = 1;
|
||||||
|
ubus_invoke(ctx, id, "notify_response", b.head, NULL, NULL, timeout * 1000);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue