[Sumover-dev] [svn commit] r3820 - rat/trunk

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Fri Sep 8 12:50:24 BST 2006


Author: piers
Date: Fri Sep  8 12:49:36 2006
New Revision: 3820

Modified:
   rat/trunk/main_control.c

Log:
Moved "should_exit = FALSE;" back to before rendezvous with other MBUS entities,
allowing for graceful exit if failure occurs in other engines (which will set 
should_exit = TRUE). Before this got reset to FALSE when an error had already
occured resulting in the process hanging aroung waiting.


Modified: rat/trunk/main_control.c
==============================================================================
--- rat/trunk/main_control.c	(original)
+++ rat/trunk/main_control.c	Fri Sep  8 12:49:36 2006
@@ -506,10 +506,11 @@
 	token_e[0] = generate_token();
 	token_e[1] = generate_token();
         fork_process(ENGINE_NAME, c_addr, &pid_engine, num_sessions, token_e);
+        should_exit = FALSE;
 	for (i = 0; i < num_sessions; i++) {
 		debug_msg("Waiting for %s from media engine...\n", token_e[i]);
 		e_addr[i] = mbus_rendezvous_waiting(m, "()", token_e[i], m);
-		debug_msg("...got it\n");
+		debug_msg("...got it (%s)\n",e_addr[i]);
 	}
 
         if (parse_addresses(m, e_addr, argc, argv) == TRUE) {
@@ -529,7 +530,6 @@
 		}
 		debug_msg("Entering main loop\n");
 		final_iters = 25;
-                should_exit = FALSE;
                 while (final_iters > 0) {
                         mbus_send(m);
                         mbus_heartbeat(m, 1);



More information about the Sumover-dev mailing list