[Sumover-dev] [svn commit] r4549 - rat/trunk
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Thu Jan 7 12:51:14 GMT 2010
Author: piers
Date: Thu Jan 7 12:51:14 2010
New Revision: 4549
Modified:
rat/trunk/main_engine.c
rat/trunk/main_ui.c
rat/trunk/mbus_engine.c
Log:
Enhanced debug messages to be more informative and indicate which subprocess they're emanating from.
Modified: rat/trunk/main_engine.c
==============================================================================
--- rat/trunk/main_engine.c (original)
+++ rat/trunk/main_engine.c Thu Jan 7 12:51:14 2010
@@ -135,7 +135,7 @@
/* passed on startup. We respond with mbus.go(foo) sent reliably to the controller. */
/* This gets complicated, because we may have two instances of the mbus active. */
for (i = 0; i < num_sessions; i++) {
- debug_msg("Need mbus.waiting(%s) from controller...\n", token[i]);
+ debug_msg("MediaEngine Need mbus.waiting(%s) from controller...\n", token[i]);
sp[i]->mbus_waiting = TRUE;
sp[i]->mbus_waiting_token = token[i];
}
@@ -150,7 +150,7 @@
mbus_retransmit(sp[j]->mbus_engine);
done &= !sp[j]->mbus_waiting;
if (!sp[j]->mbus_waiting) {
- debug_msg("Sending mbus.go(%s) to controller...\n", token[j]);
+ debug_msg("MediaEngine Sending mbus.go(%s) to controller...\n", token[j]);
mbus_qmsgf(sp[j]->mbus_engine, c_addr, TRUE, "mbus.go", "%s", token_e[j]);
}
/* Wait till 3000*10000 (20secs) - otherwise it is an error */
@@ -158,7 +158,7 @@
return FALSE;
}
} while (!done);
- debug_msg("Got all needed mbus.waiting() messages from controller\n");
+ debug_msg("MediaEngine Got all needed mbus.waiting() messages from controller\n");
for (i = 0; i < num_sessions; i++) {
do {
@@ -174,12 +174,12 @@
}
} while (!done);
}
- debug_msg("Sent all mbus.go() messages to controller\n");
+ debug_msg("MediaEngine Sent all mbus.go() messages to controller\n");
/* At this point we know the mbus address of our controller, and have conducted */
/* a successful rendezvous with it. It will now send us configuration commands. */
for (i = 0; i < num_sessions; i++) {
- debug_msg("Need mbus.go(%s) from controller...\n", token_e[i]);
+ debug_msg("MediaEngine needs mbus.go(%s) from controller...\n", token_e[i]);
sp[i]->mbus_go = TRUE;
sp[i]->mbus_go_token = token[i];
}
@@ -197,7 +197,7 @@
done &= !sp[i]->mbus_go;
}
} while (!done);
- debug_msg("Got all needed mbus.go() messages from controller\n");
+ debug_msg("MediaEngine got all needed mbus.go() messages from controller\n");
for (i = 0; i < num_sessions; i++) {
assert(sp[i]->rtp_session[0] != NULL);
@@ -213,7 +213,7 @@
struct timeval timeout;
uint8_t i, j;
- debug_msg("Ratmedia started\n");
+ debug_msg("rat-media started argc=%d\n", argc);
#ifdef WIN32
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
Modified: rat/trunk/main_ui.c
==============================================================================
--- rat/trunk/main_ui.c (original)
+++ rat/trunk/main_ui.c Thu Jan 7 12:51:14 2010
@@ -126,27 +126,27 @@
/* Next, we signal to the controller that we are ready to go. It should be sending */
/* us an mbus.waiting(foo) where "foo" is the same as the "-token" argument we were */
/* passed on startup. We respond with mbus.go(foo) sent reliably to the controller. */
- debug_msg("Waiting for mbus.waiting(%s) from controller...\n", token);
+ debug_msg("UI waiting for mbus.waiting(%s) from controller...\n", token);
if (mbus_rendezvous_go(m, token, (void *) m, 20000000) == NULL) {
fatal_error("RAT v" RAT_VERSION, "UI failed mbus.waiting rendezvous with controller");
return FALSE;
}
- debug_msg("...got it\n");
+ debug_msg("UI got mbus.waiting(%s) from controller...\n", token);
/* At this point we know the mbus address of our controller, and have conducted */
/* a successful rendezvous with it. It will now send us configuration commands. */
/* We do mbus.waiting(foo) where "foo" is the original token. The controller will */
/* eventually respond with mbus.go(foo) when it has finished sending us commands. */
- debug_msg("Waiting for mbus.go(%s) from controller...\n", token);
+ debug_msg("UI waiting for mbus.go(%s) from controller...\n", token);
if ((mbus_rendezvous_waiting(m, c_addr, token, (void *) m, 20000000)) == NULL) {
fatal_error("RAT v" RAT_VERSION, "UI failed mbus.go rendezvous with controller");
return FALSE;
}
- debug_msg("...got it\n");
+ debug_msg("UI got mbus.go(%s) from controller...\n", token);
/* Okay, we wait for the media engine to solicit for a user interface... */
- debug_msg("Waiting for mbus.waiting(rat-ui-requested) from media engine...\n");
+ debug_msg("UI waiting for mbus.waiting(rat-ui-requested) from media engine...\n");
do {
mbus_heartbeat(m, 1);
mbus_retransmit(m);
@@ -159,7 +159,7 @@
}
} while (e_addr == NULL);
mbus_qmsgf(m, e_addr, TRUE, "mbus.go", "\"rat-ui-requested\"");
- debug_msg("...got it\n");
+ debug_msg("UI got mbus.waiting(%s) from media engine...\n", token);
tcl_init2(m, e_addr);
ui_active = TRUE;
@@ -187,7 +187,7 @@
if ((waitRet - WAIT_OBJECT_0) == 1)
{
- debug_msg("Parent process died\n");
+ debug_msg("UI: Parent process died\n");
should_exit = TRUE;
}
#else
@@ -201,7 +201,7 @@
*/
if (mbus_addr_valid(m, c_addr) == FALSE) {
should_exit = TRUE;
- debug_msg("Controller address is no longer valid. Assuming it exited.\n");
+ debug_msg("UI: Controller address is no longer valid. Assuming it exited.\n");
}
}
@@ -209,7 +209,7 @@
/* Close things down nicely... Tell the media engine we wish to detach... */
mbus_qmsgf(m, e_addr, TRUE, "tool.rat.ui.detach.request", "");
mbus_send(m);
- debug_msg("Waiting for tool.rat.ui.detach() from media engine...\n");
+ debug_msg("UI Waiting for tool.rat.ui.detach() from media engine...\n");
while (!got_detach && mbus_addr_valid(m, e_addr) && mbus_shutdown_error == FALSE) {
mbus_heartbeat(m, 1);
mbus_retransmit(m);
@@ -218,9 +218,9 @@
timeout.tv_usec = 10000;
mbus_recv(m, (void *) m, &timeout);
}
- debug_msg("...got it\n");
+ debug_msg("UI Got tool.rat.ui.detach() from media engine...\n");
} else {
- debug_msg("Engine looks like it has exited already.\n");
+ debug_msg("UI: Engine looks like it has exited already.\n");
}
if (mbus_addr_valid(m, c_addr)) {
@@ -234,7 +234,7 @@
mbus_recv(m, NULL, &timeout);
} while (!mbus_sent_all(m) && mbus_shutdown_error == FALSE);
- debug_msg("Waiting for mbus.quit() from controller...\n");
+ debug_msg("UI Waiting for mbus.quit() from controller...\n");
while (got_quit == FALSE && mbus_shutdown_error == FALSE) {
mbus_heartbeat(m, 1);
mbus_retransmit(m);
@@ -243,9 +243,9 @@
timeout.tv_usec = 10000;
mbus_recv(m, (void *) m, &timeout);
}
- debug_msg("...got it\n");
+ debug_msg("UI Got mbus.quit() from controller...\n");
} else {
- debug_msg("Controller appears to have exited already.\n");
+ debug_msg("UI: Controller appears to have exited already.\n");
}
mbus_qmsgf(m, "()", FALSE, "mbus.bye", "");
Modified: rat/trunk/mbus_engine.c
==============================================================================
--- rat/trunk/mbus_engine.c (original)
+++ rat/trunk/mbus_engine.c Thu Jan 7 12:51:14 2010
@@ -641,14 +641,12 @@
UNUSED(srce);
UNUSED(sp);
- printf("Logdebug '%s'\n", args);
-
mp = mbus_parse_init(args);
if (mbus_parse_int(mp, &enabled) &&
mbus_parse_str(mp, &file))
{
mbus_decode_str(file);
- printf("enabled=%d file=%s\n", enabled, file);
+ debug_msg("Logstats enabled=%d file=%s\n", enabled, file);
if (enabled) {
rtp_callback_open_logfile(file);
}
More information about the Sumover-dev
mailing list