|
|
@ -241,13 +241,6 @@ void LP_broadcast_message(int32_t pubsock,char *base,char *rel,bits256 destpub25 |
|
|
|
encrypted = 1; |
|
|
|
free(msgstr), msgstr = 0; |
|
|
|
} |
|
|
|
if ( IAMLP != 0 ) |
|
|
|
{ |
|
|
|
//printf("queuesend %d -> %d\n",msglen,pubsock);
|
|
|
|
LP_queuesend(crc32,pubsock,base,rel,msg,msglen); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if ( encrypted == 0 ) |
|
|
|
{ |
|
|
|
if ( (argjson= cJSON_Parse(msgstr)) != 0 ) |
|
|
@ -264,7 +257,9 @@ void LP_broadcast_message(int32_t pubsock,char *base,char *rel,bits256 destpub25 |
|
|
|
jaddstr(argjson,"method","broadcast"); |
|
|
|
msg = (void *)jprint(argjson,0); |
|
|
|
msglen = (int32_t)strlen((char *)msg) + 1; |
|
|
|
LP_queuesend(crc32,-1,base,rel,msg,msglen); |
|
|
|
if ( IAMLP != 0 ) |
|
|
|
LP_queuesend(crc32,pubsock,base,rel,msg,msglen); |
|
|
|
else LP_queuesend(crc32,-1,base,rel,msg,msglen); |
|
|
|
free(msg); |
|
|
|
} else printf("no valid method in (%s)\n",msgstr); |
|
|
|
free_json(argjson); |
|
|
@ -283,10 +278,11 @@ void LP_broadcast_message(int32_t pubsock,char *base,char *rel,bits256 destpub25 |
|
|
|
jaddstr(argjson,"method","broadcast"); |
|
|
|
msg = (void *)jprint(argjson,0); |
|
|
|
msglen = (int32_t)strlen((char *)msg) + 1; |
|
|
|
LP_queuesend(crc32,-1,base,rel,msg,msglen); |
|
|
|
if ( IAMLP != 0 ) |
|
|
|
LP_queuesend(crc32,pubsock,base,rel,msg,msglen); |
|
|
|
else LP_queuesend(crc32,-1,base,rel,msg,msglen); |
|
|
|
free(msg); |
|
|
|
} |
|
|
|
} |
|
|
|
if ( msgstr != 0 ) |
|
|
|
free(msgstr); |
|
|
|
} |
|
|
|