dc->in_receive = GNUNET_NO;
dc->client = NULL;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Will try to reconnect in 1s\n");
+ if (0 == dc->reconnect_backoff.rel_value)
+ dc->reconnect_backoff = GNUNET_TIME_UNIT_MILLISECONDS;
+ else
+ dc->reconnect_backoff = GNUNET_TIME_STD_BACKOFF (dc->reconnect_backoff);
+
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Will try to reconnect in %s\n",
+ GNUNET_STRINGS_relative_time_to_string (dc->reconnect_backoff, GNUNET_YES));
dc->task =
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &do_reconnect,
- dc);
+ GNUNET_SCHEDULER_add_delayed (dc->reconnect_backoff,
+ &do_reconnect,
+ dc);
}
return NULL;
}
dc = GNUNET_malloc (sizeof (struct GNUNET_FS_DownloadContext));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Starting download %p, %u bytes at offset %llu\n",
+ dc,
+ (unsigned long long) length,
+ (unsigned long long) offset);
dc->h = h;
dc->uri = GNUNET_FS_uri_dup (uri);
dc->meta = GNUNET_CONTAINER_meta_data_duplicate (meta);
dc->anonymity = anonymity;
dc->options = options;
dc->active =
- GNUNET_CONTAINER_multihashmap_create (1 + 2 * (length / DBLOCK_SIZE));
+ GNUNET_CONTAINER_multihashmap_create (1 + 2 * (length / DBLOCK_SIZE), GNUNET_NO);
dc->treedepth =
GNUNET_FS_compute_depth (GNUNET_FS_uri_chk_get_file_size (dc->uri));
if ((NULL == filename) && (is_recursive_download (dc)))
GNUNET_FS_download_stop (sr->probe_ctx, GNUNET_YES);
sr->probe_ctx = NULL;
}
+ if (GNUNET_SCHEDULER_NO_TASK != sr->probe_ping_task)
+ {
+ GNUNET_SCHEDULER_cancel (sr->probe_ping_task);
+ sr->probe_ping_task = GNUNET_SCHEDULER_NO_TASK;
+ }
return dc;
}
(0 == (dc->options & GNUNET_FS_DOWNLOAD_IS_PROBE))
? GNUNET_FS_QUEUE_PRIORITY_NORMAL
: GNUNET_FS_QUEUE_PRIORITY_PROBE);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Download %p put into queue as job %p\n",
+ dc,
+ dc->job_queue);
}