Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Keep in sync with last changes in the GRAS callback API
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 30 Mar 2006 23:20:12 +0000 (23:20 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 30 Mar 2006 23:20:12 +0000 (23:20 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2032 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/amok/Bandwidth/bandwidth.c
src/amok/Bandwidth/bandwidth_private.h

index 79ecf7d..4aac9c1 100644 (file)
@@ -209,8 +209,9 @@ void amok_bw_test(gras_socket_t peer,
 
    sizes are in byte
 */
 
    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) {
                            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;
   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);
 }
 
   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) {
                          
                          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);
   /* 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;
 }
 
   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;
 } 
                         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;
                         void             *payload) {
    CRITICAL0("amok_bw_cb_sat_begin: not implemented");
    return 1;
index 04b7789..b2ce0f4 100644 (file)
@@ -46,14 +46,10 @@ typedef struct {
 } s_sat_request_t,*sat_request_t;
 
 /* Prototypes of local callbacks */
 } 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 */
 
 #endif /* AMOK_BANDWIDTH_PRIVATE_H */