test
This commit is contained in:
@@ -1302,6 +1302,8 @@ void komodo_configfile(char *symbol,uint16_t port)
|
||||
{
|
||||
static char myusername[512],mypassword[8192];
|
||||
FILE *fp; uint8_t buf2[33]; char fname[512],buf[128],username[512],password[8192]; uint32_t crc,r,r2,i;
|
||||
if ( symbol != 0 && port != 0 )
|
||||
{
|
||||
r = (uint32_t)time(NULL);
|
||||
r2 = OS_milliseconds();
|
||||
memcpy(buf,&r,sizeof(r));
|
||||
@@ -1336,6 +1338,7 @@ void komodo_configfile(char *symbol,uint16_t port)
|
||||
//fprintf(stderr,"myusername.(%s)\n",myusername);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
strcpy(fname,GetDataDir().string().c_str());
|
||||
#ifdef WIN32
|
||||
while ( fname[strlen(fname)-1] != '\\' )
|
||||
@@ -1346,12 +1349,12 @@ void komodo_configfile(char *symbol,uint16_t port)
|
||||
fname[strlen(fname)-1] = 0;
|
||||
strcat(fname,"komodo.conf");
|
||||
#endif
|
||||
//printf("KOMODO.(%s)\n",fname);
|
||||
if ( (fp= fopen(fname,"rb")) != 0 )
|
||||
{
|
||||
komodo_userpass(username,password,fp);
|
||||
sprintf(KMDUSERPASS,"%s:%s",username,password);
|
||||
fclose(fp);
|
||||
printf("KOMODO.(%s) -> userpass.(%s)\n",fname,KMDUSERPASS);
|
||||
} else printf("couldnt open.(%s)\n",fname);
|
||||
}
|
||||
|
||||
@@ -1461,13 +1464,13 @@ void komodo_args()
|
||||
sleep(3);
|
||||
}
|
||||
//fprintf(stderr,"Got datadir.(%s)\n",dirname);
|
||||
komodo_configfile(ASSETCHAINS_SYMBOL,ASSETCHAINS_PORT + 1);
|
||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||
{
|
||||
int32_t komodo_baseid(char *origbase);
|
||||
extern int COINBASE_MATURITY;
|
||||
komodo_configfile(ASSETCHAINS_SYMBOL,ASSETCHAINS_PORT + 1);
|
||||
COINBASE_MATURITY = 1;
|
||||
}
|
||||
} else komodo_configfile(0,0);
|
||||
ASSETCHAINS_NOTARIES = GetArg("-ac_notaries","");
|
||||
komodo_assetchain_pubkeys((char *)ASSETCHAINS_NOTARIES.c_str());
|
||||
iguana_rwnum(1,magic,sizeof(ASSETCHAINS_MAGIC),(void *)&ASSETCHAINS_MAGIC);
|
||||
|
||||
Reference in New Issue
Block a user