A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use format precision modifier in date outputs, since some of the GRAS messages are...
[simgrid.git]
/
examples
/
gras
/
ping
/
ping_client.c
diff --git
a/examples/gras/ping/ping_client.c
b/examples/gras/ping/ping_client.c
index
2afae4b
..
c496424
100644
(file)
--- 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 {
/* 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");
} 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 {
/* 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");
} 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);
/* 10. Free the allocated resources, and shut GRAS down */
gras_socket_close(toserver);
- gras_exit();
INFO0("Done.");
INFO0("Done.");
+ gras_exit();
return 0;
} /* end_of_client */
return 0;
} /* end_of_client */