mirror of
https://github.com/clearlinux/clr-debug-info.git
synced 2026-09-06 13:51:38 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a01ce4c329 | ||
|
|
1eaaac582c | ||
|
|
935dbee3c7 | ||
|
|
0065ef2670 |
+5
-3
@@ -55,8 +55,8 @@
|
|||||||
|
|
||||||
static pthread_mutex_t dupes_mutex = PTHREAD_MUTEX_INITIALIZER;
|
static pthread_mutex_t dupes_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
char *urls[2] = { "https://debuginfo.clearlinux.org/debuginfo/",
|
char *urls[2] = { "https://cdn.download.clearlinux.org/debuginfo/",
|
||||||
"https://debuginfo.clearlinux.org/debuginfo/" };
|
"https://cdn.download.clearlinux.org/debuginfo/" };
|
||||||
int urlcounter = 1;
|
int urlcounter = 1;
|
||||||
|
|
||||||
static NcHashmap *hash = NULL;
|
static NcHashmap *hash = NULL;
|
||||||
@@ -189,6 +189,7 @@ static int curl_get_file(const char *url, const char *prefix, time_t timestamp)
|
|||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, file);
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, file);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
|
||||||
|
|
||||||
if (timestamp) {
|
if (timestamp) {
|
||||||
curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
|
curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
|
||||||
@@ -322,6 +323,7 @@ static void *server_thread(void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gettimeofday(&after, NULL);
|
gettimeofday(&after, NULL);
|
||||||
|
#if 0
|
||||||
if (timedelta(before, after) > 0.6)
|
if (timedelta(before, after) > 0.6)
|
||||||
printf("Request for %s took %5.2f seconds (%i - %i)\n",
|
printf("Request for %s took %5.2f seconds (%i - %i)\n",
|
||||||
url,
|
url,
|
||||||
@@ -329,7 +331,7 @@ static void *server_thread(void *arg)
|
|||||||
(1.0 * after.tv_usec - before.tv_usec) / 1000000.0,
|
(1.0 * after.tv_usec - before.tv_usec) / 1000000.0,
|
||||||
ret,
|
ret,
|
||||||
(int)timestamp);
|
(int)timestamp);
|
||||||
|
#endif
|
||||||
/* tell the other side we're done with the download */
|
/* tell the other side we're done with the download */
|
||||||
wr = write(fd, "ok", 3);
|
wr = write(fd, "ok", 3);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user