aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api_address_lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/transport_api_address_lookup.c')
-rw-r--r--src/transport/transport_api_address_lookup.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/transport/transport_api_address_lookup.c b/src/transport/transport_api_address_lookup.c
index c6244c28f..619e60a43 100644
--- a/src/transport/transport_api_address_lookup.c
+++ b/src/transport/transport_api_address_lookup.c
@@ -131,7 +131,6 @@ GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
131 size_t slen; 131 size_t slen;
132 size_t len; 132 size_t len;
133 struct AddressLookupMessage *msg; 133 struct AddressLookupMessage *msg;
134 struct GNUNET_TIME_Absolute abs_timeout;
135 struct AddressLookupCtx *aluCB; 134 struct AddressLookupCtx *aluCB;
136 struct GNUNET_CLIENT_Connection *client; 135 struct GNUNET_CLIENT_Connection *client;
137 char *addrbuf; 136 char *addrbuf;
@@ -150,12 +149,11 @@ GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
150 aluc (aluc_cls, NULL); 149 aluc (aluc_cls, NULL);
151 return; 150 return;
152 } 151 }
153 abs_timeout = GNUNET_TIME_relative_to_absolute (timeout);
154 msg = GNUNET_malloc (len); 152 msg = GNUNET_malloc (len);
155 msg->header.size = htons (len); 153 msg->header.size = htons (len);
156 msg->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_LOOKUP); 154 msg->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_LOOKUP);
157 msg->numeric_only = htonl (numeric); 155 msg->numeric_only = htonl (numeric);
158 msg->timeout = GNUNET_TIME_absolute_hton (abs_timeout); 156 msg->timeout = GNUNET_TIME_relative_hton (timeout);
159 msg->addrlen = htonl (addressLen); 157 msg->addrlen = htonl (addressLen);
160 addrbuf = (char *) &msg[1]; 158 addrbuf = (char *) &msg[1];
161 memcpy (addrbuf, address, addressLen); 159 memcpy (addrbuf, address, addressLen);
@@ -163,7 +161,7 @@ GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
163 aluCB = GNUNET_malloc (sizeof (struct AddressLookupCtx)); 161 aluCB = GNUNET_malloc (sizeof (struct AddressLookupCtx));
164 aluCB->cb = aluc; 162 aluCB->cb = aluc;
165 aluCB->cb_cls = aluc_cls; 163 aluCB->cb_cls = aluc_cls;
166 aluCB->timeout = abs_timeout; 164 aluCB->timeout = GNUNET_TIME_relative_to_absolute (timeout);
167 aluCB->client = client; 165 aluCB->client = client;
168 GNUNET_assert (GNUNET_OK == 166 GNUNET_assert (GNUNET_OK ==
169 GNUNET_CLIENT_transmit_and_get_response (client, 167 GNUNET_CLIENT_transmit_and_get_response (client,