Module: kamailio
Branch: 4.3
Commit: 648834a64d63aed64076dacf85ec5af1a5702333
URL:
https://github.com/kamailio/kamailio/commit/648834a64d63aed64076dacf85ec5af…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-10T13:59:16+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
(cherry picked from commit b99e9e96592a5d708ff565343f3c810b2d264577)
---
Modified: modules/rls/subscribe.c
---
Diff:
https://github.com/kamailio/kamailio/commit/648834a64d63aed64076dacf85ec5af…
Patch:
https://github.com/kamailio/kamailio/commit/648834a64d63aed64076dacf85ec5af…
---
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");