Module: kamailio
Branch: master
Commit: 093337bc7f3d8d3ce31ad3770252503628bc3599
URL:
https://github.com/kamailio/kamailio/commit/093337bc7f3d8d3ce31ad3770252503…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-21T13:05:20+02:00
evapi: debug messages for invalid len and execution of event route
---
Modified: modules/evapi/evapi_dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/093337bc7f3d8d3ce31ad3770252503…
Patch:
https://github.com/kamailio/kamailio/commit/093337bc7f3d8d3ce31ad3770252503…
---
diff --git a/modules/evapi/evapi_dispatch.c b/modules/evapi/evapi_dispatch.c
index fd6ad6c..b0aa8f5 100644
--- a/modules/evapi/evapi_dispatch.c
+++ b/modules/evapi/evapi_dispatch.c
@@ -327,6 +327,8 @@ void evapi_recv_client(struct ev_loop *loop, struct ev_io *watcher,
int revents)
k++;
}
if(k==_evapi_clients[i].rpos+rlen || frame.len<=0) {
+ LM_DBG("invalid frame len: %d kpos: %d rpos: %u rlen: %lu\n",
+ frame.len, k, _evapi_clients[i].rpos, rlen);
_evapi_clients[i].rpos = 0;
return;
}
@@ -364,6 +366,8 @@ void evapi_recv_client(struct ev_loop *loop, struct ev_io *watcher,
int revents)
k += frame.len ;
evenv.msg.s = frame.s;
evenv.msg.len = frame.len;
+ LM_DBG("executing event route for frame: [%.*s] (%d)\n",
+ frame.len, frame.s, frame.len);
evapi_run_cfg_route(&evenv, _evapi_rts.msg_received);
k++;
}