Module: kamailio
Branch: master
Commit: 43c77faa00021c7c0ee350ecc9965fd517ead92f
URL: https://github.com/kamailio/kamailio/commit/43c77faa00021c7c0ee350ecc9965fd…
Author: Dmitri Savolainen <savolainen(a)erinaco.ru>
Committer: Dmitri Savolainen <savolainen(a)erinaco.ru>
Date: 2016-08-09T12:01:59+03:00
dialog: set DLG_FLAG_CHANGED for changed dialog variables
improper flag setting has been the cause of the not DB saving in some scenarios
---
Modified: modules/dialog/dlg_var.c
---
Diff: https://github.com/kamailio/kamailio/commit/43c77faa00021c7c0ee350ecc9965fd…
Patch: https://github.com/kamailio/kamailio/commit/43c77faa00021c7c0ee350ecc9965fd…
---
diff --git a/modules/dialog/dlg_var.c b/modules/dialog/dlg_var.c
index e89ee27..dd8dd6d 100644
--- a/modules/dialog/dlg_var.c
+++ b/modules/dialog/dlg_var.c
@@ -186,7 +186,7 @@ int set_dlg_variable_unsafe(struct dlg_cell *dlg, str *key, str *val)
/* replace the current it with var and free the it */
var->next = it->next;
/* Take the previous vflags: */
- var->vflags = it->vflags & DLG_FLAG_CHANGED;
+ var->vflags = it->vflags | DLG_FLAG_CHANGED;
if (it_prev) it_prev->next = var;
else *var_list = var;
}
Hi kamailio developers,
While I was working on a custom encryption module based on the
corex network_io_intercept feature, I found a possible memory leak.
Several modules like corex, gzcompress and topoh SREV_NET_DATA_OUT to catch
an outgoing message just before sending it out. Those modules receive a
buffer with a sip message and in the end of all their trunsformations use
*build_req_buf_from_sip_req* to build a new buffer. *build_req_buf_from_sip_req
*allocated pkg memory for its result and kamailio core clears that buffer
after sending it out (forward.h:msg_send_buffer:286). As far as I
understood, when we have more than one callback in chain, they override pkg
allocated buffer and kamailio core frees only the last one (allocated by
the last callback) creating a leek.
Will be happy to be wrong, but can't find how those memory chunks are freed.
Best regargs,
Vitaliy Aleksandrov