Module: kamailio
Branch: master
Commit: 57b75141542cdaa471dab00cfb4f7d8812d41824
URL:
https://github.com/kamailio/kamailio/commit/57b75141542cdaa471dab00cfb4f7d8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-06-23T16:44:11+02:00
evapi: don't print the message after relaying to evapi dispatcher
- the dispatcher process can consume it and frees the pointers
---
Modified: modules/evapi/evapi_dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/57b75141542cdaa471dab00cfb4f7d8…
Patch:
https://github.com/kamailio/kamailio/commit/57b75141542cdaa471dab00cfb4f7d8…
---
diff --git a/modules/evapi/evapi_dispatch.c b/modules/evapi/evapi_dispatch.c
index 3029d77..159d14e 100644
--- a/modules/evapi/evapi_dispatch.c
+++ b/modules/evapi/evapi_dispatch.c
@@ -534,8 +534,8 @@ int evapi_relay(str *evdata)
int sbsize;
str *sbuf;
- LM_DBG("relaying event data [%.*s]\n",
- evdata->len, evdata->s);
+ LM_DBG("relaying event data [%.*s] (%d)\n",
+ evdata->len, evdata->s, evdata->len);
sbsize = evdata->len;
sbuf = (str*)shm_malloc(sizeof(str) + ((sbsize+32) * sizeof(char)));
@@ -560,12 +560,12 @@ int evapi_relay(str *evdata)
return -1;
}
+ LM_DBG("sending [%p] [%.*s] (%d)\n", sbuf, sbuf->len, sbuf->s,
sbuf->len);
len = write(_evapi_notify_sockets[1], &sbuf, sizeof(str*));
if(len<=0) {
LM_ERR("failed to pass the pointer to evapi dispatcher\n");
return -1;
}
- LM_DBG("sent [%p] [%.*s] (%d)\n", sbuf, sbuf->len, sbuf->s,
sbuf->len);
return 0;
}