From 40f33762f2f2a1828edb24c6aae59bb28bf22f4e Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Tue, 25 Aug 2015 18:51:41 +0200 Subject: [PATCH] Do not store ghash in ghash file! --- ghash.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ghash.c b/ghash.c index cc7d056..23305d7 100644 --- a/ghash.c +++ b/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);