Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Constructor for msg_cb_ctx should fill all fields of the structure.
authoreyraudl <eyraudl@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 14 Nov 2006 09:32:09 +0000 (09:32 +0000)
committereyraudl <eyraudl@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 14 Nov 2006 09:32:09 +0000 (09:32 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2922 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/gras/messages.h
src/gras/Msg/msg.c

index 42c2019..aca40a0 100644 (file)
@@ -99,6 +99,7 @@ XBT_PUBLIC gras_socket_t gras_msg_cb_ctx_from(gras_msg_cb_ctx_t ctx);
 XBT_PUBLIC gras_msg_cb_ctx_t gras_msg_cb_ctx_new(gras_socket_t expe, 
                                      gras_msgtype_t msgtype,
                                      unsigned long int ID,
+                                     int answer_due,
                                      double timeout);
 XBT_PUBLIC void gras_msg_cb_ctx_free(gras_msg_cb_ctx_t ctx) ;
    
index 66867f6..c669fbd 100644 (file)
@@ -463,7 +463,8 @@ void gras_msg_wait_or(double         timeout,
   }
 
   if (ctx) 
-    *ctx=gras_msg_cb_ctx_new(msg.expe,msg.type,msg.ID,60);
+    *ctx=gras_msg_cb_ctx_new(msg.expe, msg.type, msg.ID,
+                            (msg.kind == e_gras_msg_kind_rpccall), 60);
 
   if (msgt_got)
     *msgt_got = xbt_dynar_search(msgt_want,msg.type);
@@ -791,12 +792,15 @@ gras_socket_t gras_msg_cb_ctx_from(gras_msg_cb_ctx_t ctx) {
 gras_msg_cb_ctx_t gras_msg_cb_ctx_new(gras_socket_t expe, 
                                      gras_msgtype_t msgtype,
                                      unsigned long int ID,
+                                     int answer_due,
                                      double timeout) {
   gras_msg_cb_ctx_t res=xbt_new(s_gras_msg_cb_ctx_t,1);
   res->expeditor = expe;
   res->msgtype = msgtype;
   res->ID = ID;
   res->timeout = timeout;
+  res->answer_due = answer_due;
+
   return res;
 }
 /* \brief Frees a message exchange context