Skip to content

Commit

Permalink
rls: proper detection of initial subscribe to send notify with full s…
Browse files Browse the repository at this point in the history
…tate

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

(cherry picked from commit b99e9e9)
(cherry picked from commit 648834a)
  • Loading branch information
miconda committed Sep 17, 2015
1 parent 0ac700a commit 6bfe815
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/rls/subscribe.c
Expand Up @@ -786,9 +786,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");
Expand Down

0 comments on commit 6bfe815

Please sign in to comment.