Browse code

- fixed a bug on active_watchers_clean function

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

Anca Vamanu authored on 15/05/2007 07:43:04
Showing 1 changed files
... ...
@@ -667,10 +667,12 @@ void msg_active_watchers_clean(unsigned int ticks,void *param)
667 667
 		local_contact.s = (char*)row_vals[local_contact_col].val.string_val;
668 668
 		local_contact.len = local_contact.s?strlen (local_contact.s):0;
669 669
 		
670
-		size= sizeof(subs_t)+ ( to_user.len+ to_domain.len+ from_user.len+ from_domain.len+
671
-				 event_id.len+ to_tag.len+ from_tag.len+ callid.len+ contact.len+
670
+		size= sizeof(subs_t)+ ( pres_domain.len+pres_user.len + to_user.len+ 
671
+				to_domain.len+ from_user.len+ from_domain.len+ event_id.len+
672
+				to_tag.len+ from_tag.len+ callid.len+ contact.len+
672 673
 				record_route.len+ sockinfo_str.len+ local_contact.len)* sizeof(char);
673 674
 
675
+		DBG(" PRESENCE:msg_active_watchers_clean: size= %d\n", size);
674 676
 		subs= (subs_t*)pkg_malloc(size);
675 677
 		if(subs== NULL)
676 678
 		{
... ...
@@ -1371,7 +1373,7 @@ int handle_subscribe(struct sip_msg* msg, char* str1, char* str2)
1371 1373
 		result_code= subs.event->is_watcher_allowed(&subs);
1372 1374
 		if(result_code< 0)
1373 1375
 		{
1374
-			LOG(L_ERR, "PRESENCE: subscribe: ERROR in function event specific function"
1376
+			LOG(L_ERR, "PRESENCE: subscribe: ERROR in event specific function"
1375 1377
 					" is_watcher_allowed\n");
1376 1378
 			goto error;
1377 1379
 		}