From: Bart Polot Date: Fri, 28 Oct 2011 11:17:35 +0000 (+0000) Subject: Added transition code for new MESH API X-Git-Tag: initial-import-from-subversion-38251~16175 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=20bb6e2908d9991a716d751563b9b45cf79961f6;p=oweals%2Fgnunet.git Added transition code for new MESH API --- diff --git a/src/include/gnunet_mesh_service_new.h b/src/include/gnunet_mesh_service_new.h index 6dd9da66c..0497cee2f 100644 --- a/src/include/gnunet_mesh_service_new.h +++ b/src/include/gnunet_mesh_service_new.h @@ -321,6 +321,19 @@ GNUNET_MESH_notify_transmit_ready_cancel (struct GNUNET_MESH_TransmitHandle *th); +/** + * Transition API for tunnel ctx management + */ +void +GNUNET_MESH_tunnel_set_data (struct GNUNET_MESH_Tunnel *tunnel, void *data); + +/** + * Transition API for tunnel ctx management + */ +void * +GNUNET_MESH_tunnel_get_data (struct GNUNET_MESH_Tunnel *tunnel); + + #if 0 /* keep Emacsens' auto-indent happy */ { #endif diff --git a/src/mesh/mesh_api_new.c b/src/mesh/mesh_api_new.c index bfdd902b7..1d2586825 100644 --- a/src/mesh/mesh_api_new.c +++ b/src/mesh/mesh_api_new.c @@ -1575,6 +1575,25 @@ GNUNET_MESH_notify_transmit_ready_cancel (struct GNUNET_MESH_TransmitHandle *th) } +/** + * Transition API for tunnel ctx management + */ +void +GNUNET_MESH_tunnel_set_data (struct GNUNET_MESH_Tunnel *tunnel, void *data) +{ + tunnel->ctx = data; +} + +/** + * Transition API for tunnel ctx management + */ +void * +GNUNET_MESH_tunnel_get_data (struct GNUNET_MESH_Tunnel *tunnel) +{ + return tunnel->ctx; +} + + #if 0 /* keep Emacsens' auto-indent happy */ { #endif