diff --git a/iguana/iguana_json.c b/iguana/iguana_json.c index e7febc655..38c6c5b98 100755 --- a/iguana/iguana_json.c +++ b/iguana/iguana_json.c @@ -191,7 +191,10 @@ cJSON *SuperNET_helpjson() #include "../includes/iguana_apideclares.h" +#undef IGUANA_ARGS +#undef _IGUANA_APIDEC_H_ #include "../includes/iguana_apiundefs.h" + if ( array != 0 ) jadd(json,"API",array); jadd(json,"agents",agents); @@ -907,6 +910,7 @@ TWO_STRINGS(SuperNET,html,agentform,htmlfile) } #undef IGUANA_ARGS +#undef _IGUANA_APIDEC_H_ #include "../includes/iguana_apiundefs.h" char *SuperNET_parser(struct supernet_info *myinfo,char *agentstr,char *method,cJSON *json,char *remoteaddr) @@ -1025,8 +1029,9 @@ char *SuperNET_parser(struct supernet_info *myinfo,char *agentstr,char *method,c #define STRING_ARRAY_OBJ_STRING IGUANA_DISPATCH_SAOS #include "../includes/iguana_apideclares.h" -//#undef IGUANA_ARGS +#undef IGUANA_ARGS +#undef _IGUANA_APIDEC_H_ #include "../includes/iguana_apiundefs.h" char errstr[512]; sprintf(errstr,"{\"error\":\"unsupported call\",\"agent\":\"%s\",\"method\":\"%s\"}",agentstr,method); diff --git a/includes/iguana_apideclares.h b/includes/iguana_apideclares.h index dc8f26e42..955acffe0 100755 --- a/includes/iguana_apideclares.h +++ b/includes/iguana_apideclares.h @@ -13,6 +13,12 @@ * * ******************************************************************************/ +#ifdef _IGUANA_APIDEC_H_ +emit compiler error if recursively being included +#endif +#ifndef _IGUANA_APIDEC_H_ +#define _IGUANA_APIDEC_H_ + STRING_ARG(dpow,pending,fiat); ZERO_ARGS(dpow,notarychains); STRING_ARG(dpow,active,maskhex); @@ -358,3 +364,5 @@ TWO_STRINGS(hmac,md4,message,passphrase); TWO_STRINGS(hmac,md5,message,passphrase); TWO_STRINGS(hmac,tiger192_3,message,passphrase); TWO_STRINGS(hmac,whirlpool,message,passphrase); + +#endif diff --git a/includes/iguana_apiundefs.h b/includes/iguana_apiundefs.h index 0b793ee2d..88156175d 100755 --- a/includes/iguana_apiundefs.h +++ b/includes/iguana_apiundefs.h @@ -49,3 +49,5 @@ #undef IGUANA_ARGS #undef IGUANA_CALLARGS +#undef _IGUANA_APIDEC_H_ +