From: mquinson Date: Tue, 19 Sep 2006 17:57:08 +0000 (+0000) Subject: And now, let the CVS compile properly. I hate that: the stuff didn't even compile... X-Git-Tag: v3.3~2571 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/12add936d351173b49b31a7a8d3cc85000185ed5 And now, let the CVS compile properly. I hate that: the stuff didn't even compile for 2 weeks, and nobody noticed. I'm glad that Malek arrived: he will set a proper testing infrastructure up git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2788 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/Transport/transport.c b/src/gras/Transport/transport.c index d763d9373e..19b6be77de 100644 --- a/src/gras/Transport/transport.c +++ b/src/gras/Transport/transport.c @@ -7,6 +7,11 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +/*** + *** Options + ***/ +int gras_opt_trp_nomoredata_on_close=0; + #include "xbt/ex.h" #include "xbt/peer.h" #include "portable.h" @@ -346,8 +351,11 @@ void gras_socket_close(gras_socket_t sock) { XBT_IN; VERB1("Close %p",sock); if (sock == _gras_lastly_selected_socket) { + xbt_assert0(!gras_opt_trp_nomoredata_on_close || !sock->moredata, + "Closing a socket having more data in buffer while the nomoredata_on_close option is activated"); + if (sock->moredata) - CRITICAL0("Closing a socket which had another message buffered after the one being handled now. Go fix your code."); + CRITICAL0("Closing a socket having more data in buffer. Option nomoredata_on_close disabled, so continuing."); _gras_lastly_selected_socket=NULL; } diff --git a/src/gras/Transport/transport_interface.h b/src/gras/Transport/transport_interface.h index abbc09f6d6..b606cf7a1a 100644 --- a/src/gras/Transport/transport_interface.h +++ b/src/gras/Transport/transport_interface.h @@ -14,6 +14,11 @@ #include "portable.h" /* sometimes needed for fd_set */ +/*** + *** Options + ***/ +extern int gras_opt_trp_nomoredata_on_close; + /*** *** Main user functions ***/