diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-30 17:35:20 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-30 17:35:20 +0000 |
commit | 93d4605e1b03c80e66892e49f83ce61dddd48fd0 (patch) | |
tree | 3e8cff870afd86813370e75f6af58801595f4f5d | |
parent | f87f930cb42261aa3890ed40aff78f9a009c6e18 (diff) | |
download | gnunet-93d4605e1b03c80e66892e49f83ce61dddd48fd0.tar.gz gnunet-93d4605e1b03c80e66892e49f83ce61dddd48fd0.zip |
convert to new hello_get API
-rw-r--r-- | src/testbed/gnunet-service-testbed_oc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/testbed/gnunet-service-testbed_oc.c b/src/testbed/gnunet-service-testbed_oc.c index 02c369aaa..754f6e18d 100644 --- a/src/testbed/gnunet-service-testbed_oc.c +++ b/src/testbed/gnunet-service-testbed_oc.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include "gnunet-service-testbed.h" | 27 | #include "gnunet-service-testbed.h" |
28 | #include "gnunet-service-testbed_connectionpool.h" | 28 | #include "gnunet-service-testbed_connectionpool.h" |
29 | #include "gnunet_transport_hello_service.h" | ||
29 | 30 | ||
30 | /** | 31 | /** |
31 | * Redefine LOG with a changed log component string | 32 | * Redefine LOG with a changed log component string |
@@ -199,7 +200,7 @@ struct OverlayConnectContext | |||
199 | /** | 200 | /** |
200 | * Get GetHelloHandle to acquire a HELLO of the first peer | 201 | * Get GetHelloHandle to acquire a HELLO of the first peer |
201 | */ | 202 | */ |
202 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh; | 203 | struct GNUNET_TRANSPORT_HelloGetHandle *ghh; |
203 | 204 | ||
204 | /** | 205 | /** |
205 | * The error message we send if this overlay connect operation has timed out | 206 | * The error message we send if this overlay connect operation has timed out |
@@ -542,7 +543,7 @@ cleanup_occ (struct OverlayConnectContext *occ) | |||
542 | if (NULL != occ->cgh_ch) | 543 | if (NULL != occ->cgh_ch) |
543 | GST_connection_pool_get_handle_done (occ->cgh_ch); | 544 | GST_connection_pool_get_handle_done (occ->cgh_ch); |
544 | if (NULL != occ->ghh) | 545 | if (NULL != occ->ghh) |
545 | GNUNET_TRANSPORT_get_hello_cancel (occ->ghh); | 546 | GNUNET_TRANSPORT_hello_get_cancel (occ->ghh); |
546 | GST_connection_pool_get_handle_done (occ->cgh_p1th); | 547 | GST_connection_pool_get_handle_done (occ->cgh_p1th); |
547 | GNUNET_assert (NULL != GST_peer_list); | 548 | GNUNET_assert (NULL != GST_peer_list); |
548 | GNUNET_assert (occ->peer->reference_cnt > 0); | 549 | GNUNET_assert (occ->peer->reference_cnt > 0); |
@@ -1040,7 +1041,7 @@ hello_update_cb (void *cls, | |||
1040 | occ->hello = GNUNET_malloc (msize); | 1041 | occ->hello = GNUNET_malloc (msize); |
1041 | GST_cache_add_hello (occ->peer->id, hello); | 1042 | GST_cache_add_hello (occ->peer->id, hello); |
1042 | GNUNET_memcpy (occ->hello, hello, msize); | 1043 | GNUNET_memcpy (occ->hello, hello, msize); |
1043 | GNUNET_TRANSPORT_get_hello_cancel (occ->ghh); | 1044 | GNUNET_TRANSPORT_hello_get_cancel (occ->ghh); |
1044 | occ->ghh = NULL; | 1045 | occ->ghh = NULL; |
1045 | GST_connection_pool_get_handle_done (occ->cgh_p1th); | 1046 | GST_connection_pool_get_handle_done (occ->cgh_p1th); |
1046 | occ->cgh_p1th = NULL; | 1047 | occ->cgh_p1th = NULL; |
@@ -1090,7 +1091,8 @@ p1_transport_connect_cache_callback (void *cls, | |||
1090 | "0x%llx: Timeout while acquiring HELLO of peer %s", | 1091 | "0x%llx: Timeout while acquiring HELLO of peer %s", |
1091 | occ->op_id, | 1092 | occ->op_id, |
1092 | GNUNET_i2s (&occ->peer_identity)); | 1093 | GNUNET_i2s (&occ->peer_identity)); |
1093 | occ->ghh = GNUNET_TRANSPORT_get_hello (cfg, | 1094 | occ->ghh = GNUNET_TRANSPORT_hello_get (cfg, |
1095 | GNUNET_TRANSPORT_AC_ANY, | ||
1094 | &hello_update_cb, | 1096 | &hello_update_cb, |
1095 | occ); | 1097 | occ); |
1096 | } | 1098 | } |