From 7adfce2b7512408ccdbb8ec063fb0a67b876fba3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 8 Jul 2017 15:59:14 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index cd5e841cc..6cf0ebed4 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -193,6 +193,8 @@ char *LP_process_message(void *ctx,char *typestr,char *myipaddr,int32_t pubsock, if ( jsonstr != 0 && (argjson= cJSON_Parse(jsonstr)) != 0 ) { uint8_t decoded[LP_ENCRYPTED_MAXSIZE + crypto_box_ZEROBYTES]; + printf("[%s]\n",jsonstr); + cipherlen = 0; if ( (cipherstr= jstr(argjson,"cipher")) != 0 && (cipherlen= is_hexstr(cipherstr,0)) > 32 && cipherlen <= sizeof(decoded)*2 ) { if ( (method= jstr(argjson,"method")) != 0 && strcmp(method,"encrypted") == 0 ) @@ -207,7 +209,7 @@ char *LP_process_message(void *ctx,char *typestr,char *myipaddr,int32_t pubsock, printf("%02x %02x %08x decrypted.(%s)\n",decoded[0],decoded[1],crc32,jsonstr); } } - } + } else printf("cipherlen.%d\n",cipherlen); len = (int32_t)strlen(jsonstr) + 1; if ( (retstr= LP_command_process(ctx,myipaddr,pubsock,argjson,&((uint8_t *)ptr)[len],recvlen - len)) != 0 ) {