From 8b166842cf79389293a5ad953b195caa6a03331f Mon Sep 17 00:00:00 2001 From: eyraudl Date: Tue, 14 Nov 2006 09:32:09 +0000 Subject: [PATCH] Constructor for msg_cb_ctx should fill all fields of the structure. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2922 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- include/gras/messages.h | 1 + src/gras/Msg/msg.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/gras/messages.h b/include/gras/messages.h index 42c2019826..aca40a0c19 100644 --- a/include/gras/messages.h +++ b/include/gras/messages.h @@ -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) ; diff --git a/src/gras/Msg/msg.c b/src/gras/Msg/msg.c index 66867f64ef..c669fbdf4d 100644 --- a/src/gras/Msg/msg.c +++ b/src/gras/Msg/msg.c @@ -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 -- 2.20.1