diff options
Diffstat (limited to 'src/transport/transport_api_blacklist.c')
-rw-r--r-- | src/transport/transport_api_blacklist.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/transport/transport_api_blacklist.c b/src/transport/transport_api_blacklist.c index 1025edef4..2315b515f 100644 --- a/src/transport/transport_api_blacklist.c +++ b/src/transport/transport_api_blacklist.c | |||
@@ -45,11 +45,6 @@ struct GNUNET_TRANSPORT_Blacklist | |||
45 | struct GNUNET_CLIENT_Connection * client; | 45 | struct GNUNET_CLIENT_Connection * client; |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Scheduler to use. | ||
49 | */ | ||
50 | struct GNUNET_SCHEDULER_Handle *sched; | ||
51 | |||
52 | /** | ||
53 | * Configuration to use. | 48 | * Configuration to use. |
54 | */ | 49 | */ |
55 | const struct GNUNET_CONFIGURATION_Handle *cfg; | 50 | const struct GNUNET_CONFIGURATION_Handle *cfg; |
@@ -175,8 +170,7 @@ reconnect (struct GNUNET_TRANSPORT_Blacklist *br) | |||
175 | { | 170 | { |
176 | if (br->client != NULL) | 171 | if (br->client != NULL) |
177 | GNUNET_CLIENT_disconnect (br->client, GNUNET_NO); | 172 | GNUNET_CLIENT_disconnect (br->client, GNUNET_NO); |
178 | br->client = GNUNET_CLIENT_connect (br->sched, | 173 | br->client = GNUNET_CLIENT_connect ("transport", |
179 | "transport", | ||
180 | br->cfg); | 174 | br->cfg); |
181 | GNUNET_assert (br->client != NULL); | 175 | GNUNET_assert (br->client != NULL); |
182 | br->th = GNUNET_CLIENT_notify_transmit_ready (br->client, | 176 | br->th = GNUNET_CLIENT_notify_transmit_ready (br->client, |
@@ -249,27 +243,24 @@ reply (struct GNUNET_TRANSPORT_Blacklist *br) | |||
249 | * only way to re-enable connections from peers that were previously | 243 | * only way to re-enable connections from peers that were previously |
250 | * blacklisted. | 244 | * blacklisted. |
251 | * | 245 | * |
252 | * @param sched scheduler to use | ||
253 | * @param cfg configuration to use | 246 | * @param cfg configuration to use |
254 | * @param cb callback to invoke to check if connections are allowed | 247 | * @param cb callback to invoke to check if connections are allowed |
255 | * @param cb_cls closure for cb | 248 | * @param cb_cls closure for cb |
256 | * @return NULL on error, otherwise handle for cancellation | 249 | * @return NULL on error, otherwise handle for cancellation |
257 | */ | 250 | */ |
258 | struct GNUNET_TRANSPORT_Blacklist * | 251 | struct GNUNET_TRANSPORT_Blacklist * |
259 | GNUNET_TRANSPORT_blacklist (struct GNUNET_SCHEDULER_Handle *sched, | 252 | GNUNET_TRANSPORT_blacklist (const struct GNUNET_CONFIGURATION_Handle *cfg, |
260 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
261 | GNUNET_TRANSPORT_BlacklistCallback cb, | 253 | GNUNET_TRANSPORT_BlacklistCallback cb, |
262 | void *cb_cls) | 254 | void *cb_cls) |
263 | { | 255 | { |
264 | struct GNUNET_CLIENT_Connection * client; | 256 | struct GNUNET_CLIENT_Connection * client; |
265 | struct GNUNET_TRANSPORT_Blacklist *ret; | 257 | struct GNUNET_TRANSPORT_Blacklist *ret; |
266 | 258 | ||
267 | client = GNUNET_CLIENT_connect (sched, "transport", cfg); | 259 | client = GNUNET_CLIENT_connect ("transport", cfg); |
268 | if (NULL == client) | 260 | if (NULL == client) |
269 | return NULL; | 261 | return NULL; |
270 | ret = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_Blacklist)); | 262 | ret = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_Blacklist)); |
271 | ret->client = client; | 263 | ret->client = client; |
272 | ret->sched = sched; | ||
273 | ret->cfg = cfg; | 264 | ret->cfg = cfg; |
274 | ret->th = GNUNET_CLIENT_notify_transmit_ready (client, | 265 | ret->th = GNUNET_CLIENT_notify_transmit_ready (client, |
275 | sizeof (struct GNUNET_MessageHeader), | 266 | sizeof (struct GNUNET_MessageHeader), |