.
This commit is contained in:
@@ -669,7 +669,7 @@ uint16_t hush_userpass(char *userpass,char *symbol)
|
||||
|
||||
#define is_cJSON_True(json) ((json) != 0 && ((json)->type & 0xff) == cJSON_True)
|
||||
|
||||
char *komodo_issuemethod(char *userpass,char *method,char *params,uint16_t port)
|
||||
char *hush_issuemethod(char *userpass,char *method,char *params,uint16_t port)
|
||||
{
|
||||
//static void *cHandle;
|
||||
char url[512],*retstr=0,*retstr2=0,postdata[8192];
|
||||
@@ -691,7 +691,7 @@ int32_t games_sendrawtransaction(char *rawtx)
|
||||
char *params,*retstr,*hexstr; cJSON *retjson,*resobj; int32_t retval = -1;
|
||||
params = (char *)malloc(strlen(rawtx) + 16);
|
||||
sprintf(params,"[\"%s\"]",rawtx);
|
||||
if ( (retstr= komodo_issuemethod(USERPASS,(char *)"sendrawtransaction",params,GAMES_PORT)) != 0 )
|
||||
if ( (retstr= hush_issuemethod(USERPASS,(char *)"sendrawtransaction",params,GAMES_PORT)) != 0 )
|
||||
{
|
||||
if ( 0 ) // causes 4th level crash
|
||||
{
|
||||
@@ -768,7 +768,7 @@ int32_t games_progress(struct games_state *rs,int32_t waitflag,uint64_t seed,gam
|
||||
if ( fp == 0 )
|
||||
fp = fopen("keystrokes.log","a");
|
||||
sprintf(params,"[\"keystrokes\",\"17\",\"[%%22%s%%22,%%22%s%%22]\"]",Gametxidstr,hexstr);
|
||||
if ( (retstr= komodo_issuemethod(USERPASS,(char *)"cclib",params,GAMES_PORT)) != 0 )
|
||||
if ( (retstr= hush_issuemethod(USERPASS,(char *)"cclib",params,GAMES_PORT)) != 0 )
|
||||
{
|
||||
if ( fp != 0 )
|
||||
{
|
||||
@@ -978,7 +978,7 @@ int32_t games_setplayerdata(struct games_state *rs,char *gametxidstr)
|
||||
else
|
||||
{
|
||||
sprintf(params,"[\"gameinfo\",\"17\",\"[%%22%s%%22]\"]",gametxidstr);
|
||||
filestr = komodo_issuemethod(USERPASS,(char *)"cclib",params,GAMES_PORT);
|
||||
filestr = hush_issuemethod(USERPASS,(char *)"cclib",params,GAMES_PORT);
|
||||
}
|
||||
if ( filestr != 0 )
|
||||
{
|
||||
|
||||
@@ -206,7 +206,7 @@ int32_t issue_games_events(struct games_state *rs,char *gametxidstr,uint32_t eve
|
||||
sprintf(params,"[\"events\",\"17\",\"[%%22%08x%%22,%%22%s%%22,%u]\"]",(uint32_t)c&0xffffffff,gametxidstr,eventid);
|
||||
else if ( sizeof(c) == 8 )
|
||||
sprintf(params,"[\"events\",\"17\",\"[%%22%016llx%%22,%%22%s%%22,%u]\"]",(long long)c,gametxidstr,eventid);
|
||||
if ( (retstr= komodo_issuemethod(USERPASS,(char *)"cclib",params,GAMES_PORT)) != 0 )
|
||||
if ( (retstr= hush_issuemethod(USERPASS,(char *)"cclib",params,GAMES_PORT)) != 0 )
|
||||
{
|
||||
if ( (retjson= cJSON_Parse(retstr)) != 0 )
|
||||
{
|
||||
@@ -237,7 +237,7 @@ int32_t issue_bet(struct games_state *rs,int64_t x,int64_t betsize)
|
||||
x >>= 8;
|
||||
}
|
||||
sprintf(params,"[\"bet\",\"17\",\"[%.8f,%%22%s%%22]\"]",dstr(betsize),hexstr);
|
||||
if ( (retstr= komodo_issuemethod(USERPASS,(char *)"cclib",params,GAMES_PORT)) != 0 )
|
||||
if ( (retstr= hush_issuemethod(USERPASS,(char *)"cclib",params,GAMES_PORT)) != 0 )
|
||||
{
|
||||
if ( (retjson= cJSON_Parse(retstr)) != 0 )
|
||||
{
|
||||
|
||||
@@ -822,7 +822,7 @@ int32_t issue_games_events(struct games_state *rs,char *gametxidstr,uint32_t eve
|
||||
sprintf(params,"[\"events\",\"17\",\"[%%22%08x%%22,%%22%s%%22,%u]\"]",(uint32_t)c&0xffffffff,gametxidstr,eventid);
|
||||
else if ( sizeof(c) == 8 )
|
||||
sprintf(params,"[\"events\",\"17\",\"[%%22%016llx%%22,%%22%s%%22,%u]\"]",(long long)c,gametxidstr,eventid);
|
||||
if ( (retstr= komodo_issuemethod(USERPASS,(char *)"cclib",params,GAMES_PORT)) != 0 )
|
||||
if ( (retstr= hush_issuemethod(USERPASS,(char *)"cclib",params,GAMES_PORT)) != 0 )
|
||||
{
|
||||
if ( (retjson= cJSON_Parse(retstr)) != 0 )
|
||||
{
|
||||
|
||||
@@ -716,7 +716,7 @@ uint16_t hush_userpass(char *userpass,char *symbol)
|
||||
|
||||
#define is_cJSON_True(json) ((json) != 0 && ((json)->type & 0xff) == cJSON_True)
|
||||
|
||||
char *komodo_issuemethod(char *userpass,char *method,char *params,uint16_t port)
|
||||
char *hush_issuemethod(char *userpass,char *method,char *params,uint16_t port)
|
||||
{
|
||||
//static void *cHandle;
|
||||
char url[512],*retstr=0,*retstr2=0,postdata[8192];
|
||||
@@ -740,7 +740,7 @@ int32_t rogue_sendrawtransaction(char *rawtx)
|
||||
char *params,*retstr,*hexstr; cJSON *retjson,*resobj; int32_t retval = -1;
|
||||
params = (char *)malloc(strlen(rawtx) + 16);
|
||||
sprintf(params,"[\"%s\"]",rawtx);
|
||||
if ( (retstr= komodo_issuemethod(USERPASS,"sendrawtransaction",params,ROGUE_PORT)) != 0 )
|
||||
if ( (retstr= hush_issuemethod(USERPASS,"sendrawtransaction",params,ROGUE_PORT)) != 0 )
|
||||
{
|
||||
if ( 0 ) // causes 4th level crash
|
||||
{
|
||||
@@ -805,7 +805,7 @@ int32_t rogue_progress(struct rogue_state *rs,int32_t waitflag,uint64_t seed,cha
|
||||
if ( 0 && (pastkeys= rogue_keystrokesload(&numpastkeys,seed,1)) != 0 )
|
||||
{
|
||||
sprintf(params,"[\"extract\",\"17\",\"[%%22%s%%22]\"]",Gametxidstr);
|
||||
if ( (retstr= komodo_issuemethod(USERPASS,"cclib",params,ROGUE_PORT)) != 0 )
|
||||
if ( (retstr= hush_issuemethod(USERPASS,"cclib",params,ROGUE_PORT)) != 0 )
|
||||
{
|
||||
if ( (retjson= cJSON_Parse(retstr)) != 0 )
|
||||
{
|
||||
@@ -847,7 +847,7 @@ int32_t rogue_progress(struct rogue_state *rs,int32_t waitflag,uint64_t seed,cha
|
||||
if ( fp == 0 )
|
||||
fp = fopen("keystrokes.log","a");
|
||||
sprintf(params,"[\"keystrokes\",\"17\",\"[%%22%s%%22,%%22%s%%22]\"]",Gametxidstr,hexstr);
|
||||
if ( (retstr= komodo_issuemethod(USERPASS,"cclib",params,ROGUE_PORT)) != 0 )
|
||||
if ( (retstr= hush_issuemethod(USERPASS,"cclib",params,ROGUE_PORT)) != 0 )
|
||||
{
|
||||
if ( fp != 0 )
|
||||
{
|
||||
@@ -905,7 +905,7 @@ int32_t rogue_setplayerdata(struct rogue_state *rs,char *gametxidstr)
|
||||
else
|
||||
{
|
||||
sprintf(params,"[\"gameinfo\",\"17\",\"[%%22%s%%22]\"]",gametxidstr);
|
||||
filestr = komodo_issuemethod(USERPASS,"cclib",params,ROGUE_PORT);
|
||||
filestr = hush_issuemethod(USERPASS,"cclib",params,ROGUE_PORT);
|
||||
}
|
||||
if ( filestr != 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user