datastorage: fix hearingmap not synced

The datastorage-refactoring changes an already existing entry instead
of inserting and deleting it. However, it was forgotten to adopt
some information from the new probe entry.

The ht_capabilities and vht_capabilities are now synced correctly.

RCPI and RSNI is now correctly synced.
This commit is contained in:
Polynomialdivision 2020-08-26 10:26:48 +02:00
parent 25a493c438
commit c2c0009d61
3 changed files with 31 additions and 13 deletions

View file

@ -51,8 +51,8 @@ static const struct blobmsg_policy prob_policy[__PROB_MAX] = {
[PROB_TARGET_ADDR] = {.name = "target", .type = BLOBMSG_TYPE_STRING},
[PROB_SIGNAL] = {.name = "signal", .type = BLOBMSG_TYPE_INT32},
[PROB_FREQ] = {.name = "freq", .type = BLOBMSG_TYPE_INT32},
[PROB_HT_CAPABILITIES] = {.name = "ht_capabilities", .type = BLOBMSG_TYPE_TABLE},
[PROB_VHT_CAPABILITIES] = {.name = "vht_capabilities", .type = BLOBMSG_TYPE_TABLE},
[PROB_HT_CAPABILITIES] = {.name = "ht_capabilities", .type = BLOBMSG_TYPE_TABLE}, //ToDo: Change to int8?
[PROB_VHT_CAPABILITIES] = {.name = "vht_capabilities", .type = BLOBMSG_TYPE_TABLE}, //ToDo: Change to int8?
[PROB_RCPI] = {.name = "rcpi", .type = BLOBMSG_TYPE_INT32},
[PROB_RSNI] = {.name = "rsni", .type = BLOBMSG_TYPE_INT32},
};
@ -283,7 +283,7 @@ int handle_network_msg(char* msg) {
if (strncmp(method, "probe", 5) == 0) {
probe_entry *entry = parse_to_probe_req(data_buf.head);
if (entry != NULL) {
if (entry != insert_to_array(entry, false, false, false, time(0))) // use 802.11k values
if (entry != insert_to_array(entry, false, true, false, time(0))) // use 802.11k values
{
// insert found an existing entry, rather than linking in our new one
dawn_free(entry);