From: mquinson Date: Thu, 30 Mar 2006 23:20:12 +0000 (+0000) Subject: Keep in sync with last changes in the GRAS callback API X-Git-Tag: v3.3~3326 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/efe8cee1c6a9b35ad67ac04d2c68cde9bb7f64ac Keep in sync with last changes in the GRAS callback API git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2032 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/amok/Bandwidth/bandwidth.c b/src/amok/Bandwidth/bandwidth.c index 79ecf7d608..4aac9c113a 100644 --- a/src/amok/Bandwidth/bandwidth.c +++ b/src/amok/Bandwidth/bandwidth.c @@ -209,8 +209,9 @@ void amok_bw_test(gras_socket_t peer, sizes are in byte */ -int amok_bw_cb_bw_handshake(gras_socket_t expeditor, +int amok_bw_cb_bw_handshake(gras_msg_cb_ctx_t ctx, void *payload) { + gras_socket_t expeditor = gras_msg_cb_ctx_from(ctx); gras_socket_t measMasterIn=NULL,measIn=NULL,measOut=NULL; bw_request_t request=*(bw_request_t*)payload; bw_request_t answer; @@ -344,9 +345,10 @@ void amok_bw_request(const char* from_name,unsigned int from_port, free(result); } -int amok_bw_cb_bw_request(gras_socket_t expeditor, +int amok_bw_cb_bw_request(gras_msg_cb_ctx_t ctx, void *payload) { + gras_socket_t expeditor = gras_msg_cb_ctx_from(ctx); /* specification of the test to run, and our answer */ bw_request_t request = *(bw_request_t*)payload; bw_res_t result = xbt_new0(s_bw_res,1); @@ -367,12 +369,12 @@ int amok_bw_cb_bw_request(gras_socket_t expeditor, return 1; } -int amok_bw_cb_sat_start(gras_socket_t expeditor, +int amok_bw_cb_sat_start(gras_msg_cb_ctx_t ctx, void *payload) { CRITICAL0("amok_bw_cb_sat_start; not implemented"); return 1; } -int amok_bw_cb_sat_begin(gras_socket_t expeditor, +int amok_bw_cb_sat_begin(gras_msg_cb_ctx_t ctx, void *payload) { CRITICAL0("amok_bw_cb_sat_begin: not implemented"); return 1; diff --git a/src/amok/Bandwidth/bandwidth_private.h b/src/amok/Bandwidth/bandwidth_private.h index 04b7789b4e..b2ce0f4e15 100644 --- a/src/amok/Bandwidth/bandwidth_private.h +++ b/src/amok/Bandwidth/bandwidth_private.h @@ -46,14 +46,10 @@ typedef struct { } s_sat_request_t,*sat_request_t; /* Prototypes of local callbacks */ -int amok_bw_cb_bw_handshake(gras_socket_t expeditor, - void *payload); -int amok_bw_cb_bw_request(gras_socket_t expeditor, - void *payload); - -int amok_bw_cb_sat_start(gras_socket_t expeditor, - void *payload); -int amok_bw_cb_sat_begin(gras_socket_t expeditor, - void *payload); +int amok_bw_cb_bw_handshake(gras_msg_cb_ctx_t ctx, void *payload); +int amok_bw_cb_bw_request(gras_msg_cb_ctx_t ctx, void *payload); + +int amok_bw_cb_sat_start(gras_msg_cb_ctx_t ctx, void *payload); +int amok_bw_cb_sat_begin(gras_msg_cb_ctx_t ctx, void *payload); #endif /* AMOK_BANDWIDTH_PRIVATE_H */