mirror of
https://github.com/clearlinux/clr-debug-info.git
synced 2026-09-06 13:51:38 +00:00
Compare commits
7
Commits
32
...
clr-debug-info-33
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3d5fab301 | ||
|
|
e377433a9d | ||
|
|
afa92c77b1 | ||
|
|
a01ce4c329 | ||
|
|
1eaaac582c | ||
|
|
935dbee3c7 | ||
|
|
0065ef2670 |
+1
-1
@@ -2,7 +2,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.66])
|
||||
AC_INIT(clr-debug-info, 32, arjan@linux.intel.com)
|
||||
AC_INIT(clr-debug-info, 33, arjan@linux.intel.com)
|
||||
AM_INIT_AUTOMAKE([foreign -Wall -W subdir-objects])
|
||||
AM_SILENT_RULES([yes])
|
||||
AC_PROG_CC
|
||||
|
||||
@@ -85,6 +85,7 @@ void try_to_get(const char *path, int pid, time_t timestamp)
|
||||
if (ret == 0 && cred.pid == pid) {
|
||||
printf("Recursion\n");
|
||||
close(sockfd);
|
||||
return;
|
||||
}
|
||||
|
||||
command = NULL;
|
||||
|
||||
+17
-3
@@ -55,8 +55,8 @@
|
||||
|
||||
static pthread_mutex_t dupes_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
char *urls[2] = { "https://debuginfo.clearlinux.org/debuginfo/",
|
||||
"https://debuginfo.clearlinux.org/debuginfo/" };
|
||||
char *urls[2] = { "https://cdn.download.clearlinux.org/debuginfo/",
|
||||
"https://cdn.download.clearlinux.org/debuginfo/" };
|
||||
int urlcounter = 1;
|
||||
|
||||
static NcHashmap *hash = NULL;
|
||||
@@ -189,6 +189,19 @@ 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_WRITEDATA, file);
|
||||
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
|
||||
|
||||
/*
|
||||
* Some sane timeout values to prevent stalls
|
||||
*
|
||||
* Connect timeout is for first connection to the server.
|
||||
* The low speed timeout is for slow downloads. Since many
|
||||
* files are several mB large, we want to prevent them from
|
||||
* taking forever. (1kB/sec avg over 30secs).
|
||||
*/
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 30);
|
||||
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 30);
|
||||
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1024);
|
||||
|
||||
if (timestamp) {
|
||||
curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
|
||||
@@ -322,6 +335,7 @@ static void *server_thread(void *arg)
|
||||
}
|
||||
|
||||
gettimeofday(&after, NULL);
|
||||
#if 0
|
||||
if (timedelta(before, after) > 0.6)
|
||||
printf("Request for %s took %5.2f seconds (%i - %i)\n",
|
||||
url,
|
||||
@@ -329,7 +343,7 @@ static void *server_thread(void *arg)
|
||||
(1.0 * after.tv_usec - before.tv_usec) / 1000000.0,
|
||||
ret,
|
||||
(int)timestamp);
|
||||
|
||||
#endif
|
||||
/* tell the other side we're done with the download */
|
||||
wr = write(fd, "ok", 3);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user