mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
update receive network func
This commit is contained in:
parent
86f1b8b755
commit
2bfc32fe38
1 changed files with 2 additions and 25 deletions
|
@ -68,31 +68,8 @@ void *receive_msg(void *args) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
recv_string[recv_string_len] = '\0';
|
recv_string[recv_string_len] = '\0';
|
||||||
|
|
||||||
probe_entry prob_req;
|
handle_network_msg(recv_string);
|
||||||
struct blob_buf b;
|
|
||||||
|
|
||||||
blob_buf_init(&b, 0);
|
|
||||||
blobmsg_add_json_from_string(&b, recv_string);
|
|
||||||
|
|
||||||
char *str;
|
|
||||||
str = blobmsg_format_json(b.head, true);
|
|
||||||
|
|
||||||
if (str == NULL) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strlen(str) <= 0) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strstr(str, "clients") != NULL) {
|
|
||||||
parse_to_clients(b.head, 0, 0);
|
|
||||||
} else if (strstr(str, "target") != NULL) {
|
|
||||||
if (parse_to_probe_req(b.head, &prob_req) == 0) {
|
|
||||||
insert_to_array(prob_req, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue