aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api_peer_address_lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/transport_api_peer_address_lookup.c')
-rw-r--r--src/transport/transport_api_peer_address_lookup.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/transport/transport_api_peer_address_lookup.c b/src/transport/transport_api_peer_address_lookup.c
index 83ed074a3..a564058ce 100644
--- a/src/transport/transport_api_peer_address_lookup.c
+++ b/src/transport/transport_api_peer_address_lookup.c
@@ -141,12 +141,13 @@ GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle
141 141
142 client = GNUNET_CLIENT_connect ("transport", cfg); 142 client = GNUNET_CLIENT_connect ("transport", cfg);
143 if (client == NULL) 143 if (client == NULL)
144 return NULL; 144 return NULL;
145 msg.header.size = htons (sizeof (struct PeerAddressLookupMessage)); 145 msg.header.size = htons (sizeof (struct PeerAddressLookupMessage));
146 msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_PEER_ADDRESS_LOOKUP); 146 msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_PEER_ADDRESS_LOOKUP);
147 msg.timeout = GNUNET_TIME_relative_hton (timeout); 147 msg.timeout = GNUNET_TIME_relative_hton (timeout);
148 memcpy (&msg.peer, peer, sizeof (struct GNUNET_PeerIdentity)); 148 memcpy (&msg.peer, peer, sizeof (struct GNUNET_PeerIdentity));
149 alc = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PeerAddressLookupContext)); 149 alc =
150 GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PeerAddressLookupContext));
150 alc->cb = peer_address_callback; 151 alc->cb = peer_address_callback;
151 alc->cb_cls = peer_address_callback_cls; 152 alc->cb_cls = peer_address_callback_cls;
152 alc->timeout = GNUNET_TIME_relative_to_absolute (timeout); 153 alc->timeout = GNUNET_TIME_relative_to_absolute (timeout);
@@ -166,7 +167,9 @@ GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle
166 * @param alc handle for the request to cancel 167 * @param alc handle for the request to cancel
167 */ 168 */
168void 169void
169GNUNET_TRANSPORT_peer_address_lookup_cancel (struct GNUNET_TRANSPORT_PeerAddressLookupContext *alc) 170GNUNET_TRANSPORT_peer_address_lookup_cancel (struct
171 GNUNET_TRANSPORT_PeerAddressLookupContext
172 *alc)
170{ 173{
171 GNUNET_CLIENT_disconnect (alc->client, GNUNET_NO); 174 GNUNET_CLIENT_disconnect (alc->client, GNUNET_NO);
172 GNUNET_free (alc); 175 GNUNET_free (alc);