From 24f9cf0156e3f5137cb2f02e077e8c6a9d17f93d Mon Sep 17 00:00:00 2001 From: mquinson Date: Tue, 4 Apr 2006 08:27:05 +0000 Subject: [PATCH] When answering a RPC, use the answer message type, not the request one. 'Some' RPC are not symetric ;) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2060 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/gras/Msg/sg_msg.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gras/Msg/sg_msg.c b/src/gras/Msg/sg_msg.c index 97e612e178..ae22b297f4 100644 --- a/src/gras/Msg/sg_msg.c +++ b/src/gras/Msg/sg_msg.c @@ -45,6 +45,12 @@ void gras_msg_send_ext(gras_socket_t sock, msg->payl=xbt_malloc(msg->payl_size); whole_payload_size = gras_datadesc_copy(gras_datadesc_by_name("ex_t"), payload,msg->payl); + } else if (kind == e_gras_msg_kind_rpcanswer) { + msg->payl_size=gras_datadesc_size(msgtype->answer_type); + msg->payl=xbt_malloc(msg->payl_size); + if (msgtype->answer_type) + whole_payload_size = gras_datadesc_copy(msgtype->answer_type, + payload, msg->payl); } else { msg->payl_size=gras_datadesc_size(msgtype->ctn_type); msg->payl=xbt_malloc(msg->payl_size); @@ -61,7 +67,8 @@ void gras_msg_send_ext(gras_socket_t sock, if (MSG_task_put(task, sock_data->to_host,sock_data->to_chan) != MSG_OK) THROW0(system_error,0,"Problem during the MSG_task_put"); - VERB3("Sent a message type '%s' kind '%s' ID %lu", + VERB5("Sent to %s(%d) a message type '%s' kind '%s' ID %lu", + MSG_host_get_name(sock_data->to_host),sock_data->to_PID, msg->type->name, e_gras_msg_kind_names[msg->kind], msg->ID); -- 2.20.1