Преглед на файлове

- port from opensips, r4491, Credits goes to Anca Vamanu
- fixed version bug for winfo Notifies, closes #2026681



git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4547 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt преди 17 години
родител
ревизия
616d83a4e5
променени са 2 файла, в които са добавени 5 реда и са изтрити 2 реда
  1. 4 1
      modules_k/presence/notify.c
  2. 1 1
      modules_k/presence/subscribe.c

+ 4 - 1
modules_k/presence/notify.c

@@ -371,6 +371,7 @@ str* get_wi_notify_body(subs_t* subs, subs_t* watcher_subs)
 	int len = 0;
 	unsigned int hash_code;
 	subs_t* s= NULL;
+	int state = FULL_STATE_FLAG;
 
 	hash_code = 0;
 	version_str = int2str(subs->version, &len);
@@ -422,6 +423,8 @@ str* get_wi_notify_body(subs_t* subs, subs_t* watcher_subs)
 		w->next= watchers->next;
 		watchers->next= w;
 
+		state = PARTIAL_STATE_FLAG;
+
 		goto done;
 	}
 
@@ -496,7 +499,7 @@ str* get_wi_notify_body(subs_t* subs, subs_t* watcher_subs)
 	
 done:
 	notify_body = create_winfo_xml(watchers,version_str,subs->pres_uri,
-			FULL_STATE_FLAG );
+			state );
 	
 	if(watcher_subs == NULL) 
 		lock_release(&subs_htable[hash_code].lock);

+ 1 - 1
modules_k/presence/subscribe.c

@@ -225,7 +225,7 @@ int update_subs_db(subs_t* subs, int type)
 		update_keys[n_update_cols] = &str_version_col;
 		update_vals[n_update_cols].type = DB_INT;
 		update_vals[n_update_cols].nul = 0;
-		update_vals[n_update_cols].val.int_val = subs->version+ 1; 
+		update_vals[n_update_cols].val.int_val = subs->version+ 1;
 		n_update_cols++;
 	}