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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2015-09-10T12:24:07+02:00

rls: proper detection of initial subscribe to send notify with full state

- use to-tag conditions, previously was sending only based on db mode
- reported by GH#276

---

Modified: modules/rls/subscribe.c

---

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

---

diff --git a/modules/rls/subscribe.c b/modules/rls/subscribe.c
index a4735b2..9c24ac7 100644
--- a/modules/rls/subscribe.c
+++ b/modules/rls/subscribe.c
@@ -781,9 +781,9 @@ int rls_handle_subscribe(struct sip_msg* msg, str 
watcher_user, str watcher_doma
                }
        }
 
-       if (dbmode != RLS_DB_ONLY)
+       if (get_to(msg)->tag_value.s==NULL || get_to(msg)->tag_value.len==0)
        {
-               /* sending notify with full state */
+               /* initial subscriber - sending notify with full state */
                if(send_full_notify(&subs, service_node, &subs.pres_uri, 
hash_code)<0)
                {
                        LM_ERR("failed sending full state notify\n");


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to