mirror of
https://github.com/clearlinux/clr-debug-info.git
synced 2026-09-06 05:41:43 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
670069d659 | ||
|
|
be74f893e6 | ||
|
|
7a5e4a9acd | ||
|
|
07a4c3d305 | ||
|
|
ab0e59628f | ||
|
|
af4a3f64f0 |
@@ -20,3 +20,5 @@ install-sh
|
||||
missing
|
||||
stamp-h1
|
||||
*.tar.gz
|
||||
tags
|
||||
cscope.*
|
||||
|
||||
+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, 21, arjan@linux.intel.com)
|
||||
AC_INIT(clr-debug-info, 30, arjan@linux.intel.com)
|
||||
AM_INIT_AUTOMAKE([foreign -Wall -W subdir-objects])
|
||||
AM_SILENT_RULES([yes])
|
||||
AC_PROG_CC
|
||||
|
||||
+19
-4
@@ -43,7 +43,7 @@
|
||||
|
||||
static GMutex dupes_mutex;
|
||||
|
||||
char *urls[2] = {"https://debuginfo.clearlinux.org/debuginfo/", "http://debuginfo.fenrus.org/debuginfo/" };
|
||||
char *urls[2] = {"https://debuginfo.clearlinux.org/debuginfo/", "https://debuginfo.clearlinux.org/debuginfo/" };
|
||||
int urlcounter = 1;
|
||||
|
||||
|
||||
@@ -122,7 +122,13 @@ static int curl_get_file(const char *url, const char *prefix, time_t timestamp)
|
||||
fflush(file);
|
||||
// printf("HTTP return code is %i\n", ret);
|
||||
|
||||
if (ret != 200 && ret != 404)
|
||||
/* HTTP 304 is returned if (a) the cached debuginfo has the same
|
||||
* timestamp or is newer than that on the server and (b) we haven't
|
||||
* already added the URL to the hash table. So, the first crash for a
|
||||
* boot may result in a 304 if the debuginfo had been downloaded in a
|
||||
* previous boot.
|
||||
*/
|
||||
if (ret != 200 && ret != 404 && ret != 304)
|
||||
urlcounter++;
|
||||
|
||||
if (ret == 200) {
|
||||
@@ -219,8 +225,17 @@ static void *server_thread(void *arg)
|
||||
// printf("Getting url %s %i:%06i\n", url, before.tv_sec, before.tv_usec);
|
||||
ret = curl_get_file(url, prefix, timestamp);
|
||||
|
||||
if (ret != 200)
|
||||
printf("Request for %s resulted in error %i\n", url, ret);
|
||||
switch (ret) {
|
||||
case 200:
|
||||
case 300:
|
||||
case 304:
|
||||
case 404:
|
||||
// ignore these error codes
|
||||
break;
|
||||
default:
|
||||
printf("Request for %s resulted in error %i\n", url, ret);
|
||||
break;
|
||||
}
|
||||
|
||||
gettimeofday(&after, NULL);
|
||||
if (timedelta(before, after) > 0.6)
|
||||
|
||||
Reference in New Issue
Block a user