evolution-data-server r8950 - branches/camel-db-summary/camel
- From: psankar svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r8950 - branches/camel-db-summary/camel
- Date: Sat, 7 Jun 2008 11:01:04 +0000 (UTC)
Author: psankar
Date: Sat Jun 7 11:01:04 2008
New Revision: 8950
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8950&view=rev
Log:
trash etc.
Still some crash somewhere with camelchangeinfo
Modified:
branches/camel-db-summary/camel/camel-folder-summary.c
branches/camel-db-summary/camel/camel-folder.c
branches/camel-db-summary/camel/camel-vee-summary.c
branches/camel-db-summary/camel/camel-vtrash-folder.c
branches/camel-db-summary/camel/camel-vtrash-folder.h
Modified: branches/camel-db-summary/camel/camel-folder-summary.c
==============================================================================
--- branches/camel-db-summary/camel/camel-folder-summary.c (original)
+++ branches/camel-db-summary/camel/camel-folder-summary.c Sat Jun 7 11:01:04 2008
@@ -471,6 +471,8 @@
info = g_hash_table_lookup (s->loaded_infos, uid);
+ CAMEL_SUMMARY_UNLOCK(s, ref_lock);
+ CAMEL_SUMMARY_UNLOCK(s, summary_lock);
if (!info) {
CamelDB *cdb;
CamelException ex;// May be this should come from the caller
@@ -482,29 +484,26 @@
folder_name = s->folder->full_name;
cdb = s->folder->parent_store->cdb;
-
- CAMEL_SUMMARY_UNLOCK(s, ref_lock);
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
+
ret = camel_db_read_message_info_record_with_uid (cdb, folder_name, uid, (gpointer**) &s, camel_read_mir_callback, &ex);
if (ret != 0) {
return NULL;
}
CAMEL_SUMMARY_LOCK(s, summary_lock);
CAMEL_SUMMARY_LOCK(s, ref_lock);
-
+
info = g_hash_table_lookup (s->loaded_infos, uid);
if (!info) {
/* Makes no sense now as the exception is local as of now. FIXME: Pass exception from caller */
camel_exception_set (&ex, CAMEL_EXCEPTION_SYSTEM, _(g_strdup_printf ("no uid [%s] exists", uid)));
+ CAMEL_SUMMARY_UNLOCK(s, ref_lock);
+ CAMEL_SUMMARY_UNLOCK(s, summary_lock);
+ return NULL;
}
}
- if (info)
- info->refcount++;
-
- CAMEL_SUMMARY_UNLOCK(s, ref_lock);
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
+ info->refcount++;
return info;
}
Modified: branches/camel-db-summary/camel/camel-folder.c
==============================================================================
--- branches/camel-db-summary/camel/camel-folder.c (original)
+++ branches/camel-db-summary/camel/camel-folder.c Sat Jun 7 11:01:04 2008
@@ -1095,27 +1095,14 @@
}
static GPtrArray *
-get_uids(CamelFolder *folder)
+get_uids (CamelFolder *folder)
{
GPtrArray *array;
int i, j, count;
- array = g_ptr_array_new();
-
g_return_val_if_fail(folder->summary != NULL, array);
- count = camel_folder_summary_count(folder->summary);
- g_ptr_array_set_size(array, count);
- for (i = 0, j = 0; i < count; i++) {
- CamelMessageInfo *info = camel_folder_summary_index(folder->summary, i);
-
- if (info) {
- array->pdata[j++] = g_strdup (camel_message_info_uid (info));
- camel_message_info_free(info);
- }
- }
-
- g_ptr_array_set_size (array, j);
+ array = camel_folder_summary_array (folder->summary);
return array;
}
Modified: branches/camel-db-summary/camel/camel-vee-summary.c
==============================================================================
--- branches/camel-db-summary/camel/camel-vee-summary.c (original)
+++ branches/camel-db-summary/camel/camel-vee-summary.c Sat Jun 7 11:01:04 2008
@@ -68,6 +68,7 @@
CamelMessageInfo *info;
gpointer p;
+ g_print ("vee_info_ptr is : [%s]\n", mi->uid);
info = camel_folder_summary_uid (vmi->summary, mi->uid+8);
p = (gpointer) camel_message_info_ptr(info, id);
camel_message_info_free (info);
@@ -255,7 +256,9 @@
mi->info.uid = vuid;
- camel_folder_summary_add(&s->summary, (CamelMessageInfo *)mi);
+ camel_folder_summary_add (&s->summary, (CamelMessageInfo *) mi);
+
+ g_print ("Adding to vee summary : [%s]\n", ((CamelMessageInfo *) mi)->uid);
return mi;
}
Modified: branches/camel-db-summary/camel/camel-vtrash-folder.c
==============================================================================
--- branches/camel-db-summary/camel/camel-vtrash-folder.c (original)
+++ branches/camel-db-summary/camel/camel-vtrash-folder.c Sat Jun 7 11:01:04 2008
@@ -441,7 +441,7 @@
vtrash_folder_changed(CamelVeeFolder *vf, CamelFolder *sub, CamelFolderChangeInfo *changes)
{
CamelMessageInfo *info;
- char hash[8];
+ char hash[8] = { '\0', '\0', '\0', '\0', '\0', '\0', '\0' };
CamelFolderChangeInfo *vf_changes = NULL;
int i;
Modified: branches/camel-db-summary/camel/camel-vtrash-folder.h
==============================================================================
--- branches/camel-db-summary/camel/camel-vtrash-folder.h (original)
+++ branches/camel-db-summary/camel/camel-vtrash-folder.h Sat Jun 7 11:01:04 2008
@@ -36,8 +36,8 @@
typedef struct _CamelVTrashFolder CamelVTrashFolder;
typedef struct _CamelVTrashFolderClass CamelVTrashFolderClass;
-#define CAMEL_VTRASH_NAME ".#evolution/Trash"
-#define CAMEL_VJUNK_NAME ".#evolution/Junk"
+#define CAMEL_VTRASH_NAME "evo_local/Trash"
+#define CAMEL_VJUNK_NAME "evo_local/Junk"
typedef enum _camel_vtrash_folder_t {
CAMEL_VTRASH_FOLDER_TRASH,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]