Module: kamailio
Branch: master
Commit: 6b8d9e583d72b2d3ae5727b756c3ab1fe0ac8c1e
URL: 
https://github.com/kamailio/kamailio/commit/6b8d9e583d72b2d3ae5727b756c3ab1fe0ac8c1e

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2025-10-24T09:33:55+02:00

dialog: use prefix and make static global variable for msg id

---

Modified: src/modules/dialog/dlg_var.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/6b8d9e583d72b2d3ae5727b756c3ab1fe0ac8c1e.diff
Patch: 
https://github.com/kamailio/kamailio/commit/6b8d9e583d72b2d3ae5727b756c3ab1fe0ac8c1e.patch

---

diff --git a/src/modules/dialog/dlg_var.c b/src/modules/dialog/dlg_var.c
index f1ee3e1dbdd..b8508fd240c 100644
--- a/src/modules/dialog/dlg_var.c
+++ b/src/modules/dialog/dlg_var.c
@@ -43,7 +43,7 @@ extern int spiral_detected;
 /*! global variable table, in case the dialog does not exist yet */
 static struct dlg_var *_dlg_var_table = 0;
 /*! ID of the current message */
-int msg_id;
+static int _dlg_var_msg_id = 0;
 
 int dlg_cfg_cb(sip_msg_t *msg, unsigned int flags, void *cbp)
 {
@@ -158,9 +158,9 @@ struct dlg_var *get_local_varlist_pointer(
 {
        struct dlg_var *var;
        /* New list, delete the old one */
-       if(msg->id != msg_id) {
+       if(msg->id != _dlg_var_msg_id) {
                free_local_varlist();
-               msg_id = msg->id;
+               _dlg_var_msg_id = msg->id;
        }
        var = _dlg_var_table;
        if(clear_pointer)

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to