mirror of
https://github.com/owntracks/recorder.git
synced 2024-11-15 18:08:28 -07:00
API /last could crash with Greenwich defined
This commit is contained in:
parent
996e5c478a
commit
67851bf217
@ -155,6 +155,9 @@ static void get_gw_data(char *username, char *device, JsonNode *last)
|
||||
char **t, *js;
|
||||
static UT_string *ts = NULL;
|
||||
|
||||
if (last == NULL || last->tag != JSON_OBJECT)
|
||||
return;
|
||||
|
||||
for (t = types; t && *t; t++) {
|
||||
utstring_renew(ts);
|
||||
utstring_printf(ts, "%s/last/%s/%s/%s.json",
|
||||
@ -193,8 +196,6 @@ void append_device_details(JsonNode *userlist, char *user, char *device)
|
||||
}
|
||||
|
||||
json_append_element(userlist, last);
|
||||
} else {
|
||||
json_delete(last);
|
||||
}
|
||||
|
||||
snprintf(path, BUFSIZ, "%s/cards/%s/%s.json",
|
||||
|
Loading…
Reference in New Issue
Block a user