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
Keep in sync with last changes in the GRAS callback API. See, that's not such a big...
[simgrid.git]
/
examples
/
gras
/
ping
/
ping.c
diff --git
a/examples/gras/ping/ping.c
b/examples/gras/ping/ping.c
index
a6c84d2
..
e8780f8
100644
(file)
--- a/
examples/gras/ping/ping.c
+++ b/
examples/gras/ping/ping.c
@@
-32,12
+32,12
@@
typedef struct {
} server_data_t;
} server_data_t;
-static int server_cb_ping_handler(gras_socket_t expeditor,
- void *payload_data) {
+static int server_cb_ping_handler(gras_msg_cb_ctx_t ctx, void *payload) {
xbt_ex_t e;
xbt_ex_t e;
- /* 1. Get the payload into the msg variable */
- int msg=*(int*)payload_data;
+ /* 1. Get the payload into the msg variable, and retrieve my caller */
+ int msg=*(int*)payload;
+ gras_socket_t expeditor = gras_msg_cb_ctx_from(ctx);
/* 2. Retrieve the server's state (globals) */
/* 2. Retrieve the server's state (globals) */