Browse code

- fixed some bugs in the changes from the last commit(reported by Reinhold Buchinger)

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

Anca Vamanu authored on 16/08/2007 07:52:01
Showing 4 changed files
... ...
@@ -195,11 +195,6 @@ void insert_htable(ua_pres_t* presentity)
195 195
 	hash_code= core_hash(presentity->pres_uri,presentity->watcher_uri, 
196 196
 			HASH_SIZE);
197 197
 	
198
-	if(presentity->expires < (int)time(NULL))
199
-	{
200
-		LOG(L_ERR, "PUA: insert_htable: expired information- do not insert\n");
201
-		return;
202
-	}
203 198
 	lock_get(&HashT->p_records[hash_code].lock);
204 199
 
205 200
 /*	
... ...
@@ -1055,6 +1055,7 @@ ua_pres_t* build_upsubs_cbparam(ua_pres_t* p)
1055 1055
 	subs.source_flag= p->flag;
1056 1056
 	subs.flag= UPDATE_TYPE;
1057 1057
 	subs.expires= (p->desired_expires== 0) ?-1:p->desired_expires- (int)time(NULL);
1058
+	subs.extra_headers= p->extra_headers;
1058 1059
 
1059 1060
 	cb_param= subscribe_cbparam(&subs, REQ_ME);
1060 1061
 	if(cb_param== NULL)
... ...
@@ -410,7 +410,7 @@ int send_publish( publ_info_t* publ )
410 410
 	pres.pres_uri= publ->pres_uri;
411 411
 	pres.flag= publ->source_flag;
412 412
 	pres.id= publ->id;
413
-
413
+	pres.event= publ->event;
414 414
 	if(publ->etag)
415 415
 		pres.etag= *publ->etag;
416 416
 
... ...
@@ -674,6 +674,7 @@ int send_subscribe(subs_info_t* subs)
674 674
 	pres.watcher_uri= subs->watcher_uri;
675 675
 	pres.flag= subs->source_flag;
676 676
 	pres.id= subs->id;
677
+	pres.event= subs->event;
677 678
 
678 679
 	presentity= search_htable(&pres, hash_code);
679 680