Do not store ghash in ghash file!

This commit is contained in:
Jan-Piet Mens 2015-08-25 18:51:41 +02:00
parent ab96d3b7e4
commit 40f33762f2

View File

@ -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);