summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Pepper <timothy.c.pepper@linux.intel.com>2012-10-09 12:15:03 -0700
committerTim Pepper <timothy.c.pepper@linux.intel.com>2012-10-09 12:15:03 -0700
commite696e6780fb7d63bd6f503c85e69236317e753c3 (patch)
treec7d29e3f7b3da9000df6dd08f05d44de611eae92
parent4c0117a263c9a70e693ef4b667db3f4330855bd3 (diff)
downloadcorewatcher-e696e6780fb7d63bd6f503c85e69236317e753c3.tar.gz
corewatcher-e696e6780fb7d63bd6f503c85e69236317e753c3.tar.bz2
corewatcher-e696e6780fb7d63bd6f503c85e69236317e753c3.zip
v0.9.8 bugfix update
Debug poll timer of 60 seconds got committed instead of 15 minute timer. The per-submit-url good/bad send counts were not being zeroed between urls, leading to odd log messages. The submit loop drains the work_list to the first good url. It then should break rather than continuing to loop testing the connection to possibly remaining submission urls in the url array, despite there being no work to send them. If none of the urls worked, the loop completes with work_list still holding data, which becomes the requeue_list. Thanks to William Douglas <william.douglas@intel.com> for the bug report! Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
-rw-r--r--configure.ac2
-rw-r--r--src/corewatcher.c2
-rw-r--r--src/submit.c13
3 files changed, 10 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index bfd390a..9c676b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ([2.68])
-AC_INIT([nitra-corewatcher],[0.9.7],[timothy.c.pepper@linux.intel.com])
+AC_INIT([nitra-corewatcher],[0.9.8],[timothy.c.pepper@linux.intel.com])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_CONFIG_FILES([Makefile src/Makefile])
AC_CONFIG_SRCDIR([src/corewatcher.c])
diff --git a/src/corewatcher.c b/src/corewatcher.c
index 313255a..eb373b3 100644
--- a/src/corewatcher.c
+++ b/src/corewatcher.c
@@ -207,7 +207,7 @@ int main(int argc, char**argv)
* If the system seems to generally work well, this time could be
* extended quite a bit longer probably.
*/
- g_timeout_add_seconds(60, scan_folders, NULL);
+ g_timeout_add_seconds(900, scan_folders, NULL);
g_main_loop_run(loop);
out:
diff --git a/src/submit.c b/src/submit.c
index 5f7c7cb..878b7a4 100644
--- a/src/submit.c
+++ b/src/submit.c
@@ -233,11 +233,11 @@ void *submit_loop(void __unused *unused)
curl_easy_setopt(handle, CURLOPT_NOBODY, 1);
curl_easy_setopt(handle, CURLOPT_TIMEOUT, 5);
- sentcount = 0;
- failcount = 0;
-
/* try to find a good url (curl automagically will use config'd proxies */
for (i = 0; i < url_count; i++) {
+ sentcount = 0;
+ failcount = 0;
+
curl_easy_setopt(handle, CURLOPT_URL, submit_url[i]);
/* check the connection before POSTing form */
@@ -246,8 +246,9 @@ void *submit_loop(void __unused *unused)
fprintf(stderr, "+ unable to contact %s\n", submit_url[i]);
continue;
}
+ fprintf(stderr, "+ Draining work_list to %s\n", submit_url[i]);
- /* have a good url/proxy now...send reports there */
+ /* have a good url/proxy now...attempt sending all reports there */
while (work_list) {
oops = work_list;
work_list = oops->next;
@@ -279,9 +280,11 @@ void *submit_loop(void __unused *unused)
if (failcount)
syslog(LOG_WARNING, "Failed to send %d coredump signatures to %s", failcount, submit_url[i]);
closelog();
+
+ break;
}
if (work_list) {
- work_list->next = requeue_list;
+ fprintf(stderr, "+ No urls worked, requeueing all work\n");
requeue_list = work_list;
}