diff libfreeDiameter/dictionary.c @ 7:e5af94b04946

Added dispatch module and tests
author Sebastien Decugis <sdecugis@nict.go.jp>
date Fri, 04 Sep 2009 18:05:25 +0900
parents bafb831ba688
children 2db15632a63d
line wrap: on
line diff
--- a/libfreeDiameter/dictionary.c	Thu Sep 03 16:03:25 2009 +0900
+++ b/libfreeDiameter/dictionary.c	Fri Sep 04 18:05:25 2009 +0900
@@ -409,9 +409,11 @@
 	}
 	
 	/* Unlink all elements from the dispatch list; they will be freed when callback is unregistered */
+	CHECK_POSIX_DO( pthread_rwlock_wrlock(&fd_disp_lock), /* continue */ );
 	while (!FD_IS_LIST_EMPTY(&obj->disp_cbs)) {
 		fd_list_unlink( obj->disp_cbs.next );
 	}
+	CHECK_POSIX_DO( pthread_rwlock_unlock(&fd_disp_lock), /* continue */ );
 	
 	/* Last, destroy the object */
 	free(obj);
"Welcome to our mercurial repository"