X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/12538c6ab1bc03405ac74e6b2995ba1b4ee29bfa..db6dd0c1d8b7be03a61ac10f52da7956ef0ab7b0:/examples/gras/ping/ping_client.c diff --git a/examples/gras/ping/ping_client.c b/examples/gras/ping/ping_client.c index 2afae4bd08..c49642463c 100644 --- a/examples/gras/ping/ping_client.c +++ b/examples/gras/ping/ping_client.c @@ -54,7 +54,7 @@ int client(int argc,char *argv[]) { /* 7. Prepare and send the ping message to the server */ ping = 1234; TRY { - gras_msg_send(toserver, gras_msgtype_by_name("ping"), &ping); + gras_msg_send(toserver, "ping", &ping); } CATCH(e) { gras_socket_close(toserver); RETHROW0("Failed to send PING to server: %s"); @@ -65,8 +65,7 @@ int client(int argc,char *argv[]) { /* 8. Wait for the answer from the server, and deal with issues */ TRY { - gras_msg_wait(6000,gras_msgtype_by_name("pong"), - &from,&pong); + gras_msg_wait(6000,"pong", &from,&pong); } CATCH(e) { gras_socket_close(toserver); RETHROW0("Why can't I get my PONG message like everyone else: %s"); @@ -79,7 +78,7 @@ int client(int argc,char *argv[]) { /* 10. Free the allocated resources, and shut GRAS down */ gras_socket_close(toserver); - gras_exit(); INFO0("Done."); + gras_exit(); return 0; } /* end_of_client */