summaryrefslogtreecommitdiff
path: root/server/src/queryhandler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/queryhandler.cc')
-rw-r--r--server/src/queryhandler.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/src/queryhandler.cc b/server/src/queryhandler.cc
index e21d820..b78f8c4 100644
--- a/server/src/queryhandler.cc
+++ b/server/src/queryhandler.cc
@@ -176,8 +176,8 @@ std::string QueryHandler::exec()
" device_type=\"%s\"\n"
" filter=\"latest\"\n"
" location=\"all\"/>\n",
- query.device_id.c_str(),
- query.device_type.c_str());
+ query.attributes["device_id"].c_str(),
+ query.attributes["device_type"].c_str());
socket->write(buf, strlen(buf));
@@ -212,7 +212,9 @@ int main()
QueryHandler qh(&s, "2003791613");
- Query q1("lensmeter", "lensmeter");
+ Query q1;
+ q1.attributes["device_id"] = "lensmeter";
+ q1.attributes["device_type"] = "lensmeter";
qh.addQuery(q1);
std::string res = qh.exec();