FC Updates from BitShares and myself #21

Closed
nathanielhourt wants to merge 687 commits from dapp-support into latest-fc
Showing only changes of commit 44896485d1 - Show all commits

View file

@ -18,10 +18,10 @@
namespace fc { namespace rpc { namespace fc { namespace rpc {
static std::string& cli_regex_secret() static boost::regex& cli_regex_secret()
{ {
static std::string* regex_secret = new std::string(); static boost::regex* regex_expr = new boost::regex();
return *regex_secret; return *regex_expr;
} }
static std::vector<std::string>& cli_commands() static std::vector<std::string>& cli_commands()
@ -101,8 +101,6 @@ void cli::run()
break; break;
} }
std::cout << "\n";
line += char(EOF); line += char(EOF);
fc::variants args = fc::json::variants_from_string(line); fc::variants args = fc::json::variants_from_string(line);
if( args.size() == 0 ) if( args.size() == 0 )
@ -212,9 +210,7 @@ static int cli_completion(char *token, char ***array)
*/ */
static int cli_check_secret(const char *source) static int cli_check_secret(const char *source)
{ {
boost::regex expr{cli_regex_secret()}; if (boost::regex_match(source, cli_regex_secret()))
if (boost::regex_match(source, expr))
return 1; return 1;
return 0; return 0;