2009-02-23 [colin] 3.7.0cvs72
authorColin Leroy <colin@colino.net>
Mon, 23 Feb 2009 09:23:38 +0000 (09:23 +0000)
committerColin Leroy <colin@colino.net>
Mon, 23 Feb 2009 09:23:38 +0000 (09:23 +0000)
* src/imap.c
Always initialise error code to no error

ChangeLog
PATCHSETS
configure.ac
src/imap.c

index 844ee9e..a8f3644 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-23 [colin]     3.7.0cvs72
+
+       * src/imap.c
+               Always initialise error code to no error
+
 2009-02-23 [colin]     3.7.0cvs71
 
        * src/imap.c
index 7fa891f..86b9224 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.60.2.131 -r 1.60.2.132 src/addressbook.c;  cvs diff -u -r 1.49.2.125 -r 1.49.2.126 src/procmime.c;  ) > 3.7.0cvs69.patchset
 ( cvs diff -u -r 1.25.2.64 -r 1.25.2.65 src/stock_pixmap.c;  cvs diff -u -r 1.2.2.25 -r 1.2.2.26 src/gtk/colorlabel.c;  ) > 3.7.0cvs70.patchset
 ( cvs diff -u -r 1.179.2.240 -r 1.179.2.241 src/imap.c;  ) > 3.7.0cvs71.patchset
+( cvs diff -u -r 1.179.2.241 -r 1.179.2.242 src/imap.c;  ) > 3.7.0cvs72.patchset
index b6105fd..185e74c 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=7
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=71
+EXTRA_VERSION=72
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -286,6 +286,8 @@ AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
                 sys/param.h sys/utsname.h sys/select.h \
                 wchar.h wctype.h locale.h netdb.h)
+AC_CHECK_HEADER([execinfo.h], [AC_DEFINE(HAVE_BACKTRACE,1,[Has backtrace*() needed for retrieving stack traces])])
+AC_SEARCH_LIBS(backtrace_symbols, [execinfo])
 
 dnl alf - Check for apache installation f*ck up. apache may also install an 
 dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined
index 2d20e9c..1c23be2 100644 (file)
@@ -2085,7 +2085,7 @@ static gint imap_scan_tree_real(Folder *folder, gboolean subs_only)
 
        if (folder->account->imap_dir && *folder->account->imap_dir) {
                gchar *real_path;
-               int r;
+               int r = MAILIMAP_NO_ERROR;
                clist * lep_list;
 
                Xstrdup_a(root_folder, folder->account->imap_dir, {return -1;});
@@ -2167,7 +2167,7 @@ static gint imap_scan_tree_recursive(IMAPSession *session, FolderItem *item, gbo
        gchar separator;
        gchar wildcard[3];
        clist * lep_list;
-       int r;
+       int r = MAILIMAP_NO_ERROR;
        
        g_return_val_if_fail(item != NULL, -1);
        g_return_val_if_fail(item->folder != NULL, -1);
@@ -2320,7 +2320,7 @@ GList *imap_scan_subtree(Folder *folder, FolderItem *item, gboolean unsubs_only,
        GSList *item_list = NULL, *cur;
        GList *child_list = NULL, *tmplist = NULL;
        GSList *sub_list = NULL;
-       int r;
+       int r = MAILIMAP_NO_ERROR;
 
        if (!session)
                return NULL;
@@ -2588,7 +2588,7 @@ static FolderItem *imap_create_folder(Folder *folder, FolderItem *parent,
        gchar separator;
        gchar *new_name;
        const gchar *p;
-       gint ok;
+       gint ok = MAILIMAP_NO_ERROR;
        gboolean no_select = FALSE, no_sub = FALSE;
        gboolean exist = FALSE;
        
@@ -2737,7 +2737,7 @@ static gint imap_rename_folder(Folder *folder, FolderItem *item,
        gchar *new_cache_dir;
        IMAPSession *session;
        gchar separator;
-       gint ok;
+       gint ok = MAILIMAP_NO_ERROR;
        gint exists, recent, unseen;
        guint32 uid_validity;
 
@@ -2827,7 +2827,7 @@ static gint imap_rename_folder(Folder *folder, FolderItem *item,
 gint imap_subscribe(Folder *folder, FolderItem *item, gchar *rpath, gboolean sub)
 {
        gchar *path;
-       gint r = -1;
+       gint r = MAILIMAP_NO_ERROR;
        IMAPSession *session;
        debug_print("getting session...\n");
 
@@ -2859,7 +2859,7 @@ gint imap_subscribe(Folder *folder, FolderItem *item, gchar *rpath, gboolean sub
 
 static gint imap_remove_folder_real(Folder *folder, FolderItem *item)
 {
-       gint ok;
+       gint ok = MAILIMAP_NO_ERROR;
        IMAPSession *session;
        gchar *path;
        gchar *cache_dir;
@@ -2891,7 +2891,10 @@ static gint imap_remove_folder_real(Folder *folder, FolderItem *item)
        }
        ok = imap_cmd_delete(session, path);
        if (ok != MAILIMAP_NO_ERROR && !is_fatal(ok)) {
-               gchar *tmp = g_strdup_printf("%s%c", path, 
+               gchar *tmp = NULL;
+               
+               ok = MAILIMAP_NO_ERROR;
+               tmp = g_strdup_printf("%s%c", path, 
                                imap_get_path_separator(session, IMAP_FOLDER(folder), path, &ok));
                g_free(path);
                path = tmp;
@@ -3160,7 +3163,7 @@ gchar imap_get_path_separator_for_item(FolderItem *item)
        IMAPFolder *imap_folder = NULL;
        IMAPSession *session = NULL;
        gchar result = '/';
-       gint ok;
+       gint ok = MAILIMAP_NO_ERROR;
        if (!item)
                return '/';
        folder = item->folder;
@@ -3211,7 +3214,7 @@ static gchar imap_refresh_path_separator(IMAPSession *session, IMAPFolder *folde
 static gchar imap_get_path_separator(IMAPSession *session, IMAPFolder *folder, const gchar *path, gint *ok)
 {
        gchar separator = '/';
-
+       *ok = MAILIMAP_NO_ERROR;
        if (folder->last_seen_separator == 0) {
                folder->last_seen_separator = imap_refresh_path_separator(session, folder, "", ok);
        }
@@ -3232,10 +3235,12 @@ static gchar *imap_get_real_path(IMAPSession *session, IMAPFolder *folder, const
 {
        gchar *real_path = NULL;
        gchar separator;
-
+       
        g_return_val_if_fail(folder != NULL, NULL);
        g_return_val_if_fail(path != NULL, NULL);
 
+       *ok = MAILIMAP_NO_ERROR;
+       
        real_path = imap_utf8_to_modified_utf7(path, FALSE);
        separator = imap_get_path_separator(session, folder, path, ok);
        if (*ok == MAILIMAP_NO_ERROR)
@@ -3328,7 +3333,7 @@ static gint imap_select(IMAPSession *session, IMAPFolder *folder,
                        gboolean block)
 {
        gchar *real_path;
-       gint ok;
+       gint ok = MAILIMAP_NO_ERROR;
        gint exists_, recent_, unseen_;
        guint32 uid_validity_;
        gint can_create_flags_;
@@ -3403,7 +3408,7 @@ static gint imap_status(IMAPSession *session, IMAPFolder *folder,
                        guint32 *uid_next, guint32 *uid_validity,
                        gint *unseen, gboolean block)
 {
-       int r;
+       int r = MAILIMAP_NO_ERROR;
        clistiter * iter;
        struct mailimap_mailbox_data_status * data_status;
        int got_values;
@@ -3903,7 +3908,7 @@ static gboolean imap_rename_folder_func(GNode *node, gpointer data)
        gchar *new_itempath;
        gint oldpathlen;
        IMAPSession *session = imap_session_get(item->folder);
-       gint ok;
+       gint ok = MAILIMAP_NO_ERROR;
        oldpathlen = strlen(oldpath);
        if (strncmp(oldpath, item->path, oldpathlen) != 0) {
                g_warning("path doesn't match: %s, %s\n", oldpath, item->path);