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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2024-05-01T06:20:43+02:00

presence: check if the local notify was dropped in event route

- free tm cb parameter on drop
- related to GH #3403

---

Modified: src/modules/presence/notify.c

---

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

---

diff --git a/src/modules/presence/notify.c b/src/modules/presence/notify.c
index 4c9dece1a39..9a8af778c04 100644
--- a/src/modules/presence/notify.c
+++ b/src/modules/presence/notify.c
@@ -1736,6 +1736,10 @@ int send_notify_request(
                        shm_free(cb_param);
                goto error;
        }
+       if(uac_r.cb_flags & TMCB_LOCAL_REQUEST_DROP) {
+               shm_free(cb_param);
+               goto done;
+       }
 
        LM_GEN2(pres_local_log_facility, pres_local_log_level,
                        "NOTIFY %.*s via %.*s on behalf of %.*s for event %.*s 
: %.*s\n",
@@ -1744,6 +1748,7 @@ int send_notify_request(
                        subs->event->name.len, subs->event->name.s, 
subs->callid.len,
                        subs->callid.s);
 
+done:
        ps_free_tm_dlg(td);
 
        if(str_hdr.s)

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to [email protected]

Reply via email to