Module: kamailio Branch: master Commit: 08cf17288861bcaa8f3b23166059ead517d1b4fe URL: https://github.com/kamailio/kamailio/commit/08cf17288861bcaa8f3b23166059ead517d1b4fe
Author: Surendra Tiwari <surendratiwa...@gmail.com> Committer: Surendra Tiwari <surendratiwa...@gmail.com> Date: 2019-07-19T13:07:32+05:30 evapi:return code and log fixed for no evapi client while sending --- Modified: src/modules/evapi/evapi_dispatch.c --- Diff: https://github.com/kamailio/kamailio/commit/08cf17288861bcaa8f3b23166059ead517d1b4fe.diff Patch: https://github.com/kamailio/kamailio/commit/08cf17288861bcaa8f3b23166059ead517d1b4fe.patch --- diff --git a/src/modules/evapi/evapi_dispatch.c b/src/modules/evapi/evapi_dispatch.c index 5b7d534d09..353dc9534b 100644 --- a/src/modules/evapi/evapi_dispatch.c +++ b/src/modules/evapi/evapi_dispatch.c @@ -728,6 +728,7 @@ int _evapi_relay(str *evdata, str *ctag, int unicast) int len; int sbsize; + int evapi_send_count; evapi_msg_t *emsg; LM_DBG("relaying event data [%.*s] (%d)\n", @@ -781,7 +782,12 @@ int _evapi_relay(str *evdata, str *ctag, int unicast) cfg_update(); LM_DBG("dispatching [%p] [%.*s] (%d)\n", emsg, emsg->data.len, emsg->data.s, emsg->data.len); - evapi_dispatch_notify(emsg); + evapi_send_count = evapi_dispatch_notify(emsg); + if (evapi_send_count == 0) { + shm_free(emsg); + LM_ERR("no evapi client to send the message, failed to send message\n"); + return -1; + } shm_free(emsg); } return 0; _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev