Commit 0d70fefc authored by fred's avatar fred
Browse files

zapi

parent 92919536
...@@ -489,6 +489,8 @@ void Zapi::receive_http_payload() ...@@ -489,6 +489,8 @@ void Zapi::receive_http_payload()
std::cout << "!!!!!!! BEFORE FORWARD PAYLOAD !!!!" << std::endl; std::cout << "!!!!!!! BEFORE FORWARD PAYLOAD !!!!" << std::endl;
//emit forward_payload(data.copy()); //emit forward_payload(data.copy());
std::cout << "!!!!!!! AFTER FORWARD PAYLOAD !!!!" << std::endl; std::cout << "!!!!!!! AFTER FORWARD PAYLOAD !!!!" << std::endl;
} }
else else
...@@ -503,6 +505,15 @@ void Zapi::receive_http_payload() ...@@ -503,6 +505,15 @@ void Zapi::receive_http_payload()
std::cout << "error on data BSON : " << e.what() << std::endl; std::cout << "error on data BSON : " << e.what() << std::endl;
goto flush_socket; goto flush_socket;
} }
BSONObj payload = BSON("status" << "ACK");
m_message->rebuild(payload.objsize());
memcpy(m_message->data(), (char*)payload.objdata(), payload.objsize());
m_socket_http->send(*m_message);
} }
} }
......
...@@ -145,6 +145,7 @@ private: ...@@ -145,6 +145,7 @@ private:
zmq::context_t *m_context; zmq::context_t *m_context;
zmq::socket_t *m_socket_http; zmq::socket_t *m_socket_http;
QMutex *m_mutex_http; QMutex *m_mutex_http;
zmq::message_t *m_message;
signals: signals:
void forward_payload(BSONObj data); void forward_payload(BSONObj data);
......
Supports Markdown
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