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 new macros THROWF and RETHROWF.
[simgrid.git]
/
examples
/
gras
/
p2p
/
can
/
can.c
diff --git
a/examples/gras/p2p/can/can.c
b/examples/gras/p2p/can/can.c
index
4fafde0
..
cde05ab
100644
(file)
--- a/
examples/gras/p2p/can/can.c
+++ b/
examples/gras/p2p/can/can.c
@@
-58,12
+58,12
@@
static void forward_get_suc(get_suc_t msg, char host[1024], int port)
TRY {
temp_sock = gras_socket_client(host, port);
} CATCH(e) {
TRY {
temp_sock = gras_socket_client(host, port);
} CATCH(e) {
- RETHROW
0
("Unable to connect!: %s");
+ RETHROW
F
("Unable to connect!: %s");
}
TRY {
gras_msg_send(temp_sock, "can_get_suc", &msg);
} CATCH(e) {
}
TRY {
gras_msg_send(temp_sock, "can_get_suc", &msg);
} CATCH(e) {
- RETHROW
0
("Unable to send!: %s");
+ RETHROW
F
("Unable to send!: %s");
}
XBT_INFO("Forwarding a get_successor message to %s for (%d;%d)", host,
msg.xId, msg.yId);
}
XBT_INFO("Forwarding a get_successor message to %s for (%d;%d)", host,
msg.xId, msg.yId);
@@
-180,7
+180,7
@@
static int node_get_suc_handler(gras_msg_cb_ctx_t ctx, void *payload_data)
temp_sock = gras_socket_client(incoming->host, incoming->port);
}
CATCH(e) {
temp_sock = gras_socket_client(incoming->host, incoming->port);
}
CATCH(e) {
- RETHROW
0
+ RETHROW
F
("Unable to connect to the node wich has requested for an area!: %s");
}
TRY {
("Unable to connect to the node wich has requested for an area!: %s");
}
TRY {
@@
-188,7
+188,7
@@
static int node_get_suc_handler(gras_msg_cb_ctx_t ctx, void *payload_data)
XBT_INFO("Environment informations sent!");
}
CATCH(e) {
XBT_INFO("Environment informations sent!");
}
CATCH(e) {
- RETHROW
2
("%s:Timeout sending environment informations to %s: %s",
+ RETHROW
F
("%s:Timeout sending environment informations to %s: %s",
globals->host, gras_socket_peer_name(expeditor));
}
gras_socket_close(temp_sock);
globals->host, gras_socket_peer_name(expeditor));
}
gras_socket_close(temp_sock);
@@
-252,7
+252,7
@@
int node(int argc, char **argv)
temp_sock = gras_socket_client(argv[4], atoi(argv[5]));
}
CATCH(e) {
temp_sock = gras_socket_client(argv[4], atoi(argv[5]));
}
CATCH(e) {
- RETHROW
0
("Unable to connect known host to request for an area!: %s");
+ RETHROW
F
("Unable to connect known host to request for an area!: %s");
}
}
@@
-265,7
+265,7
@@
int node(int argc, char **argv)
}
CATCH(e) {
gras_socket_close(temp_sock);
}
CATCH(e) {
gras_socket_close(temp_sock);
- RETHROW
0
("Unable to contact known host to get an area!: %s");
+ RETHROW
F
("Unable to contact known host to get an area!: %s");
}
gras_socket_close(temp_sock);
}
gras_socket_close(temp_sock);
@@
-276,7
+276,7
@@
int node(int argc, char **argv)
gras_msg_wait(6000, "can_rep_suc", &temp_sock2, &rep_suc_msg);
}
CATCH(e) {
gras_msg_wait(6000, "can_rep_suc", &temp_sock2, &rep_suc_msg);
}
CATCH(e) {
- RETHROW
1
("%s: Error waiting for an area:%s", globals->host);
+ RETHROW
F
("%s: Error waiting for an area:%s", globals->host);
}
// retreiving the data of the response.
}
// retreiving the data of the response.