Browse Source

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
Daniel-Constantin Mierla 10 years ago
parent
commit
b99e9e9659
1 changed files with 2 additions and 2 deletions
  1. 2 2
      modules/rls/subscribe.c

+ 2 - 2
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");