diff options
Diffstat (limited to 'src/util/socks.c')
-rw-r--r-- | src/util/socks.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/src/util/socks.c b/src/util/socks.c index cc59858dd..bda8765ad 100644 --- a/src/util/socks.c +++ b/src/util/socks.c | |||
@@ -328,7 +328,6 @@ register_reciever (struct GNUNET_SOCKS_Handshake *ih, int want) | |||
328 | * @param buf where the callee should write the message | 328 | * @param buf where the callee should write the message |
329 | * @return number of bytes written to @a buf | 329 | * @return number of bytes written to @a buf |
330 | */ | 330 | */ |
331 | |||
332 | size_t | 331 | size_t |
333 | transmit_ready (void *cls, | 332 | transmit_ready (void *cls, |
334 | size_t size, | 333 | size_t size, |
@@ -353,29 +352,19 @@ transmit_ready (void *cls, | |||
353 | * successful operations, including DNS resolution, do not use this. */ | 352 | * successful operations, including DNS resolution, do not use this. */ |
354 | if (NULL == buf) | 353 | if (NULL == buf) |
355 | { | 354 | { |
356 | const struct GNUNET_SCHEDULER_TaskContext *tc; | 355 | if (0 == ih->step) |
357 | 356 | { | |
358 | tc = GNUNET_SCHEDULER_get_task_context (); | 357 | LOG (GNUNET_ERROR_TYPE_WARNING, |
359 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 358 | "Timeout contacting SOCKS server, retrying indefinitely, but probably hopeless.\n"); |
360 | return 0; | 359 | register_sender (ih); |
361 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT)) { | 360 | } |
362 | if (0==ih->step) | 361 | else |
363 | { | 362 | { |
364 | LOG (GNUNET_ERROR_TYPE_WARNING, | 363 | LOG (GNUNET_ERROR_TYPE_ERROR, |
365 | "Timeout contacting SOCKS server, retrying indefinitely, but probably hopeless.\n"); | 364 | "Timeout during mid SOCKS handshake (step %u), probably not a SOCKS server.\n", |
366 | register_sender (ih); | 365 | ih->step); |
367 | } | 366 | GNUNET_break (0); |
368 | else | ||
369 | { | ||
370 | LOG (GNUNET_ERROR_TYPE_ERROR, | ||
371 | "Timeout during mid SOCKS handshake (step %u), probably not a SOCKS server.\n", | ||
372 | ih->step); | ||
373 | GNUNET_break (0); | ||
374 | } | ||
375 | return 0; | ||
376 | } | 367 | } |
377 | /* if (reason == 48) register_sender (ih); */ | ||
378 | /* GNUNET_break(0); */ | ||
379 | return 0; | 368 | return 0; |
380 | } | 369 | } |
381 | 370 | ||