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
  • Loading branch information
miconda committed Sep 10, 2015
1 parent c4fd918 commit b99e9e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/rls/subscribe.c
Expand Up @@ -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");
Expand Down

0 comments on commit b99e9e9

Please sign in to comment.