mirror of
https://github.com/owntracks/recorder.git
synced 2024-11-15 18:08:28 -07:00
storage: make doubly sure we're handling a location _type
This commit is contained in:
parent
b9a0ca7167
commit
8f932972c2
@ -450,6 +450,15 @@ static JsonNode *line_to_location(char *line)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if ((j = json_find_member(json, "_type")) == NULL) {
|
||||
json_delete(json);
|
||||
return (NULL);
|
||||
}
|
||||
if (j->tag != JSON_STRING || strcmp(j->string_, "location") != 0) {
|
||||
json_delete(json);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
o = json_mkobject();
|
||||
|
||||
if (json_copy_to_object(o, json, FALSE) == FALSE) {
|
||||
|
Loading…
Reference in New Issue
Block a user