Commit 685b679d authored by captainwong's avatar captainwong

update httprelay & server_demo with new api

parent 2e893557
......@@ -124,7 +124,7 @@ void on_tcp_connection(uv_tcpserver_client_context_t* client, int connected) {
uv_tcp_parse_result_t on_tcp_parse(uv_tcpserver_client_context_t* client, const char* buf, size_t len, size_t* ate) {
AdemcoPacket pkt;
AdemcoParseResult res = ademcoPacketParse(buf, len, &pkt, ate);
AdemcoParseResult res = ademcoPacketParse(buf, len, &pkt, ate, NULL);
switch (res) {
case RESULT_OK:
switch (pkt.id) {
......
......@@ -137,7 +137,8 @@ int main(int argc, char** argv) {
AdemcoParseResult result = ademcoPacketParse(clientBuffer.buff + clientBuffer.rpos,
clientBuffer.wpos - clientBuffer.rpos,
&pkt,
&cb);
&cb,
nullptr);
switch (result) {
case AdemcoParseResult::RESULT_OK:
......
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