Module: kamailio
Branch: master
Commit: b99e9e96592a5d708ff565343f3c810b2d264577
URL:
https://github.com/kamailio/kamailio/commit/b99e9e96592a5d708ff565343f3c810…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
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/b99e9e96592a5d708ff565343f3c810…
Patch:
https://github.com/kamailio/kamailio/commit/b99e9e96592a5d708ff565343f3c810…
---
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");