test
This commit is contained in:
@@ -102,7 +102,7 @@ char *komodo_issuemethod(char *method,char *params)
|
|||||||
}
|
}
|
||||||
return(retstr);
|
return(retstr);
|
||||||
}
|
}
|
||||||
//curl --url "http://127.0.0.1:14555" --user "user782512472:pass1476445872" --data "{\"method\":\"getinfo\",\"params\":[]}"
|
//curl --url "http://127.0.0.1:13033" --user "user1557335368:pass111720054" --data "{\"method\":\"getinfo\",\"params\":[]}"
|
||||||
|
|
||||||
uint32_t komodo_txtime(uint256 hash)
|
uint32_t komodo_txtime(uint256 hash)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -975,6 +975,19 @@ void komodo_configfile(char *symbol,uint16_t port)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
fclose(fp);
|
||||||
|
strcpy(fname,GetDataDir(false).string().c_str());
|
||||||
|
#ifdef WIN32
|
||||||
|
while ( fname[strlen(fname)-1] != '\\' )
|
||||||
|
fname[strlen(fname)-1] = 0;
|
||||||
|
strcat(fname,".komodo/komodo.conf");
|
||||||
|
#else
|
||||||
|
while ( fname[strlen(fname)-1] != '/' )
|
||||||
|
fname[strlen(fname)-1] = 0;
|
||||||
|
strcat(fname,".komodo/komodo.conf");
|
||||||
|
#endif
|
||||||
|
if ( (fp= fopen(fname,"rb")) != 0 )
|
||||||
{
|
{
|
||||||
rpcuser = rpcpassword = rpcport = 0;
|
rpcuser = rpcpassword = rpcport = 0;
|
||||||
while ( fgets(line,sizeof(line),fp) != 0 )
|
while ( fgets(line,sizeof(line),fp) != 0 )
|
||||||
@@ -1007,10 +1020,6 @@ void komodo_configfile(char *symbol,uint16_t port)
|
|||||||
if ( rpcpassword != 0 )
|
if ( rpcpassword != 0 )
|
||||||
free(rpcpassword);
|
free(rpcpassword);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
} else printf("couldnt open.(%s)\n",fname);
|
||||||
}
|
}
|
||||||
/*if ( (retstr= komodo_issuemethod((char *)"getinfo",0)) != 0 )
|
|
||||||
{
|
|
||||||
printf("GETINFO.%s (%s) USERPASS.%s\n",symbol,retstr,USERPASS);
|
|
||||||
free(retstr);
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user