From e4d849f60ad3a18a60c40657fe6a3fb12fa1a102 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 21 Jan 2016 18:24:35 -0300 Subject: [PATCH] test --- iguana/SuperNET.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/iguana/SuperNET.c b/iguana/SuperNET.c index eadfd90c6..e4e6fcab6 100644 --- a/iguana/SuperNET.c +++ b/iguana/SuperNET.c @@ -583,8 +583,11 @@ char *SuperNET_JSON(struct supernet_info *myinfo,cJSON *json,char *remoteaddr) remoteaddr = 0; agent = jstr(json,"agent"); method = jstr(json,"method"); - if ( strcmp(agent,"SuperNET") == 0 && strcmp(agent,"getpeers") == 0 && juint(json,"timestamp") == 0 ) - jaddnum(json,"timestamp",time(NULL)); + if ( strcmp(agent,"SuperNET") == 0 && strcmp(method,"getpeers") == 0 ) + { + if ( juint(json,"timestamp") == 0 ) + jaddnum(json,"timestamp",time(NULL)); + } if ( (tag= j64bits(json,"tag")) == 0 ) { OS_randombytes((uint8_t *)&tag,sizeof(tag));