xbt_assert1(!strncmp(e.msg,"Some error we will catch on client side",
strlen("Some error we will catch on client side")),
"Got wrong message: %s", e.msg);
- xbt_ex_free(&e);
+ xbt_ex_free(e);
}
}
int client(int argc,char *argv[]) {
- xbt_ex_t e;
+ xbt_ex_t e;
gras_socket_t toserver=NULL; /* peer */
gras_socket_t toforwarder=NULL; /* peer */
-
+ memset(&e,0,sizeof(xbt_ex_t));
int ping, pong, i;
volatile int gotit=0;
strlen("Some error we will catch on client side")),
"Got wrong message: %s", e.msg);
INFO0("Got the expected exception when calling the exception raising RPC");
- xbt_ex_free(&e);
+ xbt_ex_free(e);
}
if (!gotit)
gras_msgtype_by_name("raise exception"), NULL, NULL);
} CATCH(e) {
gotit = 1;
- xbt_ex_free(&e);
+ xbt_ex_free(e);
}
if (!gotit) {
THROW0(unknown_error,0,"Didn't got the remote exception!");
"Got wrong category: %d (instead of %d)",
e.category,unknown_error);
INFO0("Got the expected exception when calling the exception raising RPC");
- xbt_ex_free(&e);
+ xbt_ex_free(e);
exception_catching();
}
gras_msg_send(toserver,gras_msgtype_by_name("kill"),NULL);
gras_msg_send(toforwarder,gras_msgtype_by_name("kill"),NULL);
+ gras_os_sleep(1); /* give peer a chance to get the message before closing the socket */
/* 11. Cleanup the place before leaving */
gras_socket_close(toserver);
/* 5. Wait for the ping incomming messages */
- /* BUG: if the server is gone before the forwarder tries to connect,
- it dies awfully with :
+ /** \bug if the server is gone before the forwarder tries to connect,
+ it dies awfully with the following message. The problem stands somewhere
+ at the interface between the gras_socket_t and the msg mess. There is thus
+ no way for me to dive into this before this interface is rewritten
==15875== Invalid read of size 4
==15875== at 0x408B805: find_port (transport_plugin_sg.c:68)
==15875== by 0x408BD64: gras_trp_sg_socket_client (transport_plugin_sg.c:115)