diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-05 13:22:54 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-05 13:22:54 +0000 |
commit | 1e1ec14461361419b17e1933a3ac766b2e7ecec9 (patch) | |
tree | 0623f24cba7a929f542e158f2807d48216eaca7f /src/mesh | |
parent | 505524f3cc4444bcd4c7b1982599962547298dfc (diff) | |
download | gnunet-1e1ec14461361419b17e1933a3ac766b2e7ecec9.tar.gz gnunet-1e1ec14461361419b17e1933a3ac766b2e7ecec9.zip |
tell transport to connect, not core
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/Makefile.am | 1 | ||||
-rw-r--r-- | src/mesh/mesh_api.c | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/mesh/Makefile.am b/src/mesh/Makefile.am index 3623a48ad..30bc332c7 100644 --- a/src/mesh/Makefile.am +++ b/src/mesh/Makefile.am | |||
@@ -22,6 +22,7 @@ libgnunetmesh_la_SOURCES = \ | |||
22 | mesh_api.c mesh_protocol.h | 22 | mesh_api.c mesh_protocol.h |
23 | libgnunetmesh_la_LIBADD = \ | 23 | libgnunetmesh_la_LIBADD = \ |
24 | $(top_builddir)/src/util/libgnunetutil.la \ | 24 | $(top_builddir)/src/util/libgnunetutil.la \ |
25 | $(top_builddir)/src/transport/libgnunettransport.la \ | ||
25 | $(top_builddir)/src/core/libgnunetcore.la \ | 26 | $(top_builddir)/src/core/libgnunetcore.la \ |
26 | $(GN_LIBINTL) $(XLIB) | 27 | $(GN_LIBINTL) $(XLIB) |
27 | libgnunetmesh_la_LDFLAGS = \ | 28 | libgnunetmesh_la_LDFLAGS = \ |
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 5bb7d1403..a1396cd08 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <gnunet_constants.h> | 28 | #include <gnunet_constants.h> |
29 | #include <gnunet_mesh_service.h> | 29 | #include <gnunet_mesh_service.h> |
30 | #include <gnunet_core_service.h> | 30 | #include <gnunet_core_service.h> |
31 | #include <gnunet_transport_service.h> | ||
31 | #include <gnunet_container_lib.h> | 32 | #include <gnunet_container_lib.h> |
32 | #include <gnunet_applications.h> | 33 | #include <gnunet_applications.h> |
33 | 34 | ||
@@ -129,6 +130,7 @@ struct peer_list | |||
129 | struct GNUNET_MESH_Handle | 130 | struct GNUNET_MESH_Handle |
130 | { | 131 | { |
131 | struct GNUNET_CORE_Handle *core; | 132 | struct GNUNET_CORE_Handle *core; |
133 | struct GNUNET_TRANSPORT_Handle *transport; | ||
132 | struct GNUNET_MESH_MessageHandler *handlers; | 134 | struct GNUNET_MESH_MessageHandler *handlers; |
133 | struct GNUNET_PeerIdentity myself; | 135 | struct GNUNET_PeerIdentity myself; |
134 | unsigned int connected_to_core; | 136 | unsigned int connected_to_core; |
@@ -657,7 +659,7 @@ GNUNET_MESH_peer_request_connect_all (struct GNUNET_MESH_Handle *handle, | |||
657 | GNUNET_CONTAINER_DLL_insert_after (handle->pending_tunnels.head, | 659 | GNUNET_CONTAINER_DLL_insert_after (handle->pending_tunnels.head, |
658 | handle->pending_tunnels.tail, | 660 | handle->pending_tunnels.tail, |
659 | handle->pending_tunnels.tail, tunnel); | 661 | handle->pending_tunnels.tail, tunnel); |
660 | (void) GNUNET_CORE_peer_request_connect (handle->core, peers, NULL, NULL); | 662 | GNUNET_TRANSPORT_try_connect (handle->transport, peers); |
661 | } | 663 | } |
662 | 664 | ||
663 | return &tunnel->tunnel; | 665 | return &tunnel->tunnel; |
@@ -874,6 +876,8 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls, | |||
874 | GNUNET_CORE_connect (cfg, 42, ret, &core_startup, &core_connect, | 876 | GNUNET_CORE_connect (cfg, 42, ret, &core_startup, &core_connect, |
875 | &core_disconnect, NULL, NULL, GNUNET_NO, NULL, | 877 | &core_disconnect, NULL, NULL, GNUNET_NO, NULL, |
876 | GNUNET_NO, core_handlers); | 878 | GNUNET_NO, core_handlers); |
879 | ret->transport = | ||
880 | GNUNET_TRANSPORT_connect (cfg, NULL, NULL, NULL, NULL, NULL); | ||
877 | return ret; | 881 | return ret; |
878 | } | 882 | } |
879 | 883 | ||
@@ -883,6 +887,7 @@ GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle) | |||
883 | GNUNET_free (handle->handlers); | 887 | GNUNET_free (handle->handlers); |
884 | GNUNET_free (handle->hello_message); | 888 | GNUNET_free (handle->hello_message); |
885 | GNUNET_CORE_disconnect (handle->core); | 889 | GNUNET_CORE_disconnect (handle->core); |
890 | GNUNET_TRANSPORT_disconnect (handle->transport); | ||
886 | 891 | ||
887 | struct peer_list_element *element = handle->connected_peers.head; | 892 | struct peer_list_element *element = handle->connected_peers.head; |
888 | 893 | ||