remove hardcoded retry stuff; put -Werror back in (who the fk removed that?)
authorBrenden Matthews <brenden1@rty.ca>
Tue, 5 Aug 2008 18:43:24 +0000 (18:43 +0000)
committerBrenden Matthews <brenden1@rty.ca>
Tue, 5 Aug 2008 18:43:24 +0000 (18:43 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1234 7f574dfc-610e-0410-a909-a81674777703

configure.ac.in
src/conky.c
src/conky.h

index 490b7a1..cd69715 100644 (file)
@@ -644,10 +644,10 @@ AC_ARG_ENABLE([testing],
 
 if test "x$want_testing" = "xyes" -a $ac_cv_c_compiler_gnu != no; then
   if test "x$want_debug" = "xyes"; then
-    CFLAGS="$CFLAGS -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic"
+    CFLAGS="$CFLAGS -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic -Werror"
     AC_DEFINE([TESTING], [], [Define for testing (enables strict compiler flags)])
   else
-    CFLAGS="$CFLAGS -g3 -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic"
+    CFLAGS="$CFLAGS -g3 -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic -Werror"
     AC_DEFINE([TESTING], [], [Define for testing (enables strict compiler flags)])
   fi
 fi
index e830b68..8d9bde2 100644 (file)
@@ -1634,7 +1634,7 @@ void *imap_thread(void *arg)
        char recvbuf[MAXDATASIZE];
        char sendbuf[MAXDATASIZE];
        char *reply;
-       int fail = 0;
+       unsigned int fail = 0;
        unsigned int old_unseen = UINT_MAX;
        unsigned int old_messages = UINT_MAX;
        struct stat stat_buf;
@@ -1661,8 +1661,8 @@ void *imap_thread(void *arg)
                fd_set fdset;
 
                if (fail > 0) {
-                       ERR("Trying IMAP connection again for %s@%s (try %i/5)",
-                                       mail->user, mail->host, fail + 1);
+                       ERR("Trying IMAP connection again for %s@%s (try %u/%u)",
+                                       mail->user, mail->host, fail + 1, mail->retries);
                }
                do {
                        if ((sockfd = socket(PF_INET, SOCK_STREAM, 0)) == -1) {
@@ -1831,7 +1831,7 @@ void *pop3_thread(void *arg)
        char recvbuf[MAXDATASIZE];
        char sendbuf[MAXDATASIZE];
        char *reply;
-       int fail = 0;
+       unsigned int fail = 0;
        unsigned int old_unseen = UINT_MAX;
        struct stat stat_buf;
        struct hostent he, *he_res = 0;
@@ -1857,8 +1857,8 @@ void *pop3_thread(void *arg)
                fd_set fdset;
 
                if (fail > 0) {
-                       ERR("Trying POP3 connection again for %s@%s (try %i/5)",
-                                       mail->user, mail->host, fail + 1);
+                       ERR("Trying POP3 connection again for %s@%s (try %u/%u)",
+                                       mail->user, mail->host, fail + 1, mail->retries);
                }
                do {
                        if ((sockfd = socket(PF_INET, SOCK_STREAM, 0)) == -1) {
index 29410f4..decb42a 100644 (file)
@@ -156,7 +156,7 @@ struct mail_s {                     // for imap and pop3
        unsigned long used;
        unsigned long quota;
        unsigned long port;
-       unsigned long retries;
+       unsigned int retries;
        float interval;
        double last_update;
        char host[128];