diff freeDiameter/peers.c @ 649:5e5d8152c229

Implemented fd_msg_send_timeout to close #10. Not tested yet.
author Sebastien Decugis <sdecugis@nict.go.jp>
date Wed, 05 Jan 2011 17:13:34 +0900
parents f1484823cb4a
children
line wrap: on
line diff
--- a/freeDiameter/peers.c	Tue Jan 04 16:21:26 2011 +0900
+++ b/freeDiameter/peers.c	Wed Jan 05 17:13:34 2011 +0900
@@ -78,7 +78,9 @@
 	p->p_hbh = lrand48();
 	
 	fd_list_init(&p->p_sr.srs, p);
+	fd_list_init(&p->p_sr.exp, p);
 	CHECK_POSIX( pthread_mutex_init(&p->p_sr.mtx, NULL) );
+	CHECK_POSIX( pthread_cond_init(&p->p_sr.cnd, NULL) );
 	
 	fd_list_init(&p->p_connparams, p);
 	
@@ -250,6 +252,7 @@
 	
 	CHECK_FCT_DO( fd_fifo_del(&p->p_tosend), /* continue */ );
 	CHECK_POSIX_DO( pthread_mutex_destroy(&p->p_sr.mtx), /* continue */);
+	CHECK_POSIX_DO( pthread_cond_destroy(&p->p_sr.cnd), /* continue */);
 	
 	/* If the callback is still around... */
 	if (p->p_cb)
"Welcome to our mercurial repository"