Commit 4367a38b authored by Pavel Vainerman's avatar Pavel Vainerman

(admin): fix error in "sendText" funciton

parent be2f0dbe
......@@ -382,6 +382,8 @@ int main(int argc, char** argv)
return 1;
}
int mtype = uni_atoi(argv[optind]);
std::string consumers(optarg);
ostringstream txt;
if( checkArg(optind+1, argc, argv) == 0 )
......@@ -397,15 +399,14 @@ int main(int argc, char** argv)
if( checkArg(i, argc, argv) == 0 )
break;
txt << " " << argv[optind+1];
txt << " " << argv[i];
}
auto conf = uniset_init(argc, argv, conffile);
UInterface ui(conf);
ui.initBackId(uniset::AdminID);
int mtype = uni_atoi(argv[optind]);
sendText(optarg, ui, txt.str(), mtype);
sendText(consumers, ui, txt.str(), mtype);
return 0;
}
break;
......@@ -1134,6 +1135,8 @@ void sendText( const string& args, UInterface& ui, const string& txt, int mtype
auto conf = uniset_conf();
auto sl = uniset::getObjectsList( args, conf );
cout << "mtype=" << mtype << " txt: " << txt << endl;
for( auto && it : sl )
{
if( it.node == DefaultObjectId )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment