From 8a80f216e1cf65ffea72f3ac1fe7de5b33170b1e Mon Sep 17 00:00:00 2001 From: mquinson Date: Tue, 17 Jul 2007 09:18:48 +0000 Subject: [PATCH 1/1] Make the check that RPC return something more strict git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3818 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/gras/Msg/gras_msg_exchange.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/gras/Msg/gras_msg_exchange.c b/src/gras/Msg/gras_msg_exchange.c index 65b30f9eee..5a7b9cfa76 100644 --- a/src/gras/Msg/gras_msg_exchange.c +++ b/src/gras/Msg/gras_msg_exchange.c @@ -288,7 +288,9 @@ gras_msg_handleall(double period) { * @param timeOut: How long to wait for incoming messages (in seconds) * @return the error code (or no_error). * - * Messages are passed to the callbacks. See also gras_msg_handleall(). + * Any message arriving in the given interval is passed to the callbacks. + * + * @sa gras_msg_handleall(). */ void gras_msg_handle(double timeOut) { @@ -446,9 +448,12 @@ gras_msg_handle(double timeOut) { RETHROW0("Callback raised an exception: %s"); } } - xbt_assert0(!(ctx.answer_due), - "RPC callback didn't call gras_msg_rpcreturn"); + xbt_assert1(! ctx.answer_due, + "Bug in user code: RPC callback to message '%s' didn't call gras_msg_rpcreturn",msg.type->name); + if (ctx.answer_due) + CRITICAL1("BUGS BOTH IN USER CODE (RPC callback to message '%s' didn't call gras_msg_rpcreturn) " + "AND IN SIMGRID (process wasn't killed by an assert)",msg.type->name); if (!ran_ok) THROW1(mismatch_error,0, "Message '%s' refused by all registered callbacks", msg.type->name); -- 2.20.1