From 34775d996cb13adbeee3467a08e7c3724de802b6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 22 Apr 2018 16:36:00 +0300 Subject: [PATCH] Test --- src/komodo_utils.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 8219f96fc..7db807ac3 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1263,7 +1263,7 @@ void iguana_initQ(queue_t *Q,char *name) free(item); } -uint16_t komodo_userpass(char *username,char *password,FILE *fp) +uint16_t _komodo_userpass(char *username,char *password,FILE *fp) { char *rpcuser,*rpcpassword,*str,line[8192]; uint16_t port = 0; rpcuser = rpcpassword = 0; @@ -1373,7 +1373,7 @@ void komodo_configfile(char *symbol,uint16_t port) } else { - komodo_userpass(myusername,mypassword,fp); + _komodo_userpass(myusername,mypassword,fp); mapArgs["-rpcpassword"] = mypassword; mapArgs["-rpcusername"] = myusername; //fprintf(stderr,"myusername.(%s)\n",myusername); @@ -1396,7 +1396,7 @@ void komodo_configfile(char *symbol,uint16_t port) #endif if ( (fp= fopen(fname,"rb")) != 0 ) { - if ( (kmdport= komodo_userpass(username,password,fp)) != 0 ) + if ( (kmdport= _komodo_userpass(username,password,fp)) != 0 ) KMD_PORT = kmdport; sprintf(KMDUSERPASS,"%s:%s",username,password); fclose(fp); @@ -1420,12 +1420,11 @@ uint16_t komodo_userpass(char *userpass,char *symbol) komodo_statefname(fname,symbol,confname); if ( (fp= fopen(fname,"rb")) != 0 ) { - port = komodo_userpass(username,password,fp); + port = _komodo_userpass(username,password,fp); sprintf(userpass,"%s:%s",username,password); if ( strcmp(symbol,ASSETCHAINS_SYMBOL) == 0 ) strcpy(ASSETCHAINS_USERPASS,userpass); fclose(fp); - return((int32_t)strlen(userpass)); } return(port); }