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);