diff options
-rw-r--r-- | src/mesh/mesh_api_new.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mesh/mesh_api_new.c b/src/mesh/mesh_api_new.c index 2c292f7f1..5cb50b0d1 100644 --- a/src/mesh/mesh_api_new.c +++ b/src/mesh/mesh_api_new.c | |||
@@ -41,9 +41,11 @@ extern "C" | |||
41 | * Opaque handle to the service. | 41 | * Opaque handle to the service. |
42 | */ | 42 | */ |
43 | struct GNUNET_MESH_Handle { | 43 | struct GNUNET_MESH_Handle { |
44 | GNUNET_CLIENT_Connection *mesh; | ||
44 | struct GNUNET_MESH_Tunnel *head; | 45 | struct GNUNET_MESH_Tunnel *head; |
45 | struct GNUNET_MESH_Tunnel *tail; | 46 | struct GNUNET_MESH_Tunnel *tail; |
46 | GNUNET_MESH_TunnelEndHandler cleaner; | 47 | GNUNET_MESH_TunnelEndHandler cleaner; |
48 | void *cls; | ||
47 | }; | 49 | }; |
48 | 50 | ||
49 | /** | 51 | /** |
@@ -79,10 +81,22 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
79 | GNUNET_MESH_TunnelEndHandler cleaner, | 81 | GNUNET_MESH_TunnelEndHandler cleaner, |
80 | const struct GNUNET_MESH_MessageHandler *handlers, | 82 | const struct GNUNET_MESH_MessageHandler *handlers, |
81 | const GNUNET_MESH_ApplicationType *stypes) { | 83 | const GNUNET_MESH_ApplicationType *stypes) { |
82 | GNUNET_MESH_Handle *h; | 84 | GNUNET_MESH_Handle *h; |
85 | struct GNUNET_MESH_MessageHandler *aux; | ||
86 | int i; | ||
87 | uint16_t *types; | ||
88 | |||
83 | h = GNUNET_malloc(sizeof(GNUNET_MESH_Handle)); | 89 | h = GNUNET_malloc(sizeof(GNUNET_MESH_Handle)); |
84 | 90 | ||
85 | h->cleaner = cleaner; | 91 | h->cleaner = cleaner; |
92 | h->mesh = GNUNET_CLIENT_connect("mesh", cfg); | ||
93 | h->cls = cls; | ||
94 | |||
95 | aux = handlers; | ||
96 | for(i = 0; handlers[i].type; i++) { | ||
97 | |||
98 | } | ||
99 | |||
86 | return h; | 100 | return h; |
87 | } | 101 | } |
88 | 102 | ||