Fix a bug with event notifications and the new output structure (ensure it sets the output data properly).

This commit is contained in:
Ken Moore
2016-01-07 15:14:46 -05:00
parent a606d58af3
commit 40a7e41213

View File

@@ -326,13 +326,13 @@ void WebSocket::AppCafeStatusUpdate(QString msg){
if(!SendAppCafeEvents){ return; } //don't report events on this socket
RestOutputStruct out;
out.CODE = RestOutputStruct::OK;
out.in_struct.name = "event";
out.in_struct.name = "dispatcher";
out.in_struct.namesp = "events";
//Pre-set any output fields
QJsonObject outargs;
outargs.insert("name", "dispatcher");
outargs.insert("args",QJsonValue(msg));
out.out_args = outargs;
//QJsonObject outargs;
//outargs.insert("name", "dispatcher");
// outargs.insert("args",QJsonValue(msg));
out.out_args = QJsonValue(msg);//outargs;
//Assemble the output JSON document/text
out.Header << "Content-Type: text/json; charset=utf-8"; //REST header info