aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-store.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-03-30 13:04:54 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-03-30 13:04:54 +0800
commit37c97d8b096f588ba4d8fbc7182dae0a35719768 (patch)
tree8da1d45359fa5bb3157445c890818ce29c0b0ffe /camel/camel-store.c
parent71c5ee30a81ea870329f1c2573cdf6f22cfc7d75 (diff)
downloadgsoc2013-evolution-37c97d8b096f588ba4d8fbc7182dae0a35719768.tar.gz
gsoc2013-evolution-37c97d8b096f588ba4d8fbc7182dae0a35719768.tar.zst
gsoc2013-evolution-37c97d8b096f588ba4d8fbc7182dae0a35719768.zip
added some debug to dump the whole folderinfo tree if store:folder_info is
2004-03-30 Not Zed <NotZed@Ximian.com> * camel-store.c (camel_store_get_folder_info): added some debug to dump the whole folderinfo tree if store:folder_info is set. * providers/imapp/camel-imapp-driver.c: #if 0 out some code, to kill warnings. * camel-url-scanner.c: include ctype.h for isspace (wonder if it should use utf8 funcs?). 2004-03-29 Not Zed <NotZed@Ximian.com> ** See #56146. * providers/imap/camel-imap-store.c (get_folders): check the top-level folders list for duplicates as well. (get_folders_add_folders): split out the folder return merging code from get_folders. Absolute mess of crap to deal with more busted servers. * camel-debug.c (camel_debug_start, camel_debug_end): some helpers to wrap debug output for atomicicity. svn path=/trunk/; revision=25238
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r--camel/camel-store.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c
index f4b96a1959..e7d1f41651 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -31,6 +31,8 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include "camel-debug.h"
+
#include "camel-session.h"
#include "camel-store.h"
#include "camel-folder.h"
@@ -732,6 +734,24 @@ add_special_info (CamelStore *store, CamelFolderInfo *info, const char *name, co
vinfo->path = g_strdup_printf ("/%s", vinfo->name);
}
+static void
+dump_fi(CamelFolderInfo *fi, int depth)
+{
+ char *s;
+
+ s = g_alloca(depth+1);
+ memset(s, ' ', depth);
+ s[depth] = 0;
+
+ while (fi) {
+ printf("%suri: %s\n", s, fi->uri);
+ printf("%sfull_name: %s\n", s, fi->full_name);
+ printf("%sflags: %08x\n", s, fi->flags);
+ dump_fi(fi->child, depth+2);
+ fi = fi->next;
+ }
+}
+
/**
* camel_store_get_folder_info:
* @store: a CamelStore
@@ -774,6 +794,14 @@ camel_store_get_folder_info(CamelStore *store, const char *top, guint32 flags, C
if (info->uri && (store->flags & CAMEL_STORE_VJUNK))
add_special_info (store, info, CAMEL_VJUNK_NAME, _("Junk"), TRUE);
}
+
+ if (camel_debug_start("store:folder_info")) {
+ char *url = camel_url_to_string(((CamelService *)store)->url, CAMEL_URL_HIDE_ALL);
+ printf("Get folder info(%p:%s, '%s') =\n", store, url, top?top:"<null>");
+ g_free(url);
+ dump_fi(info, 2);
+ camel_debug_end();
+ }
return info;
}