mirror of
https://github.com/owntracks/recorder.git
synced 2024-11-15 09:58:40 -07:00
Do not store ghash in ghash file!
This commit is contained in:
parent
ab96d3b7e4
commit
40f33762f2
4
ghash.c
4
ghash.c
@ -181,9 +181,6 @@ void ghash_storecache(struct udata *ud, JsonNode *geo, char *ghash, char *addr,
|
||||
} else {
|
||||
char *js;
|
||||
|
||||
/* I am storing the ghash *in* the JSON purpose */
|
||||
json_append_member(geo, "ghash", json_mkstring(ghash));
|
||||
|
||||
if ((js = json_stringify(geo, NULL)) != NULL) {
|
||||
snprintf(gfile, BUFSIZ, "%s/ghash/%-3.3s", STORAGEDIR, ghash);
|
||||
if (mkpath(gfile) != 0) {
|
||||
@ -191,7 +188,6 @@ void ghash_storecache(struct udata *ud, JsonNode *geo, char *ghash, char *addr,
|
||||
return;
|
||||
}
|
||||
snprintf(gfile, BUFSIZ, "%s/ghash/%-3.3s/%s.json", STORAGEDIR, ghash, ghash);
|
||||
|
||||
if ((fp = fopen(gfile, "w")) != NULL) {
|
||||
fprintf(fp, "%s\n", js);
|
||||
fclose(fp);
|
||||
|
Loading…
Reference in New Issue
Block a user