|
@@ -43,7 +43,6 @@ void UserIoMan::printMessage(std::string msg, OutMsgType type) {
|
|
|
Json::Value root;
|
|
|
vector<string>::const_iterator connectit;
|
|
|
|
|
|
-
|
|
|
switch (type) {
|
|
|
case normal:
|
|
|
case error: {
|
|
@@ -58,13 +57,13 @@ void UserIoMan::printMessage(std::string msg, OutMsgType type) {
|
|
|
case debug: {
|
|
|
if (verbose) {
|
|
|
msgmutex.lock();
|
|
|
-
|
|
|
+
|
|
|
char *savedline = rl_copy_text(0, rl_end);
|
|
|
int savedpoint = rl_point;
|
|
|
rl_set_prompt("");
|
|
|
rl_replace_line("", 0);
|
|
|
rl_redisplay();
|
|
|
-
|
|
|
+
|
|
|
std::cerr << msg << std::endl;
|
|
|
|
|
|
rl_set_prompt(getCmdPrompt().c_str());
|
|
@@ -98,13 +97,13 @@ void UserIoMan::printJson(Json::Value root) {
|
|
|
return;
|
|
|
}
|
|
|
msgmutex.lock();
|
|
|
-
|
|
|
+
|
|
|
char *savedline = rl_copy_text(0, rl_end);
|
|
|
int savedpoint = rl_point;
|
|
|
rl_set_prompt("");
|
|
|
rl_replace_line("", 0);
|
|
|
rl_redisplay();
|
|
|
-
|
|
|
+
|
|
|
(this->*(printmap[root["command"].asString()]))(root);
|
|
|
|
|
|
rl_set_prompt(getCmdPrompt().c_str());
|
|
@@ -112,7 +111,7 @@ void UserIoMan::printJson(Json::Value root) {
|
|
|
rl_point = savedpoint;
|
|
|
rl_redisplay();
|
|
|
free(savedline);
|
|
|
-
|
|
|
+
|
|
|
msgmutex.unlock();
|
|
|
}
|
|
|
|