Module: kamailio Branch: master Commit: a6a2416e59c1e1a5cbadd3ecceecff52201be10d URL: https://github.com/kamailio/kamailio/commit/a6a2416e59c1e1a5cbadd3ecceecff52...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2019-07-19T10:03:53+02:00
evapi: adjust log message when no client connected for dispatching
---
Modified: src/modules/evapi/evapi_dispatch.c
---
Diff: https://github.com/kamailio/kamailio/commit/a6a2416e59c1e1a5cbadd3ecceecff52... Patch: https://github.com/kamailio/kamailio/commit/a6a2416e59c1e1a5cbadd3ecceecff52...
---
diff --git a/src/modules/evapi/evapi_dispatch.c b/src/modules/evapi/evapi_dispatch.c index 52a62d8551..ec56945b5e 100644 --- a/src/modules/evapi/evapi_dispatch.c +++ b/src/modules/evapi/evapi_dispatch.c @@ -728,7 +728,6 @@ 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", @@ -782,11 +781,10 @@ 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_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; + if(evapi_dispatch_notify(emsg) == 0) { + shm_free(emsg); + LM_WARN("message not delivered - no client connected\n"); + return -1; } shm_free(emsg); }