diff freeDiameter/main.c @ 90:2c9444152e4b

Added the dispatch thread code
author Sebastien Decugis <sdecugis@nict.go.jp>
date Mon, 07 Dec 2009 18:32:30 +0900
parents b6344f1d521a
children e66a82a739fa
line wrap: on
line diff
--- a/freeDiameter/main.c	Mon Dec 07 16:56:42 2009 +0900
+++ b/freeDiameter/main.c	Mon Dec 07 18:32:30 2009 +0900
@@ -99,6 +99,7 @@
 	CHECK_FCT(  fd_queues_init()  );
 	CHECK_FCT(  fd_msg_init()  );
 	CHECK_FCT(  fd_p_expi_init()  );
+	CHECK_FCT(  fd_disp_init()  );
 	CHECK_FCT(  fd_rt_init()  );
 	
 	/* Parse the configuration file */
@@ -161,9 +162,11 @@
 	
 	/* cleanups */
 	CHECK_FCT_DO( fd_servers_stop(), /* Stop accepting new connections */ );
-	TODO("Stop dispatch thread(s) properly (no cancel yet)");
+	CHECK_FCT_DO( fd_disp_cleanstop(), /* Stop dispatch thread(s) properly (no cancel yet) */ );
 	CHECK_FCT_DO( fd_peer_fini(), /* Stop all connections */ );
-	TODO("Stop dispatch & routing threads");
+	CHECK_FCT_DO( fd_rt_fini(), /* Stop routing threads */ );
+	CHECK_FCT_DO( fd_disp_fini(), /* Stop dispatch thread */ );
+	
 	CHECK_FCT_DO( fd_ext_fini(), /* Cleaup all extensions */ );
 	TODO("Cleanup queues (dump all remaining messages ?)");
 	
"Welcome to our mercurial repository"