aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2002-08-06 05:04:30 +0800
committerPeter Williams <peterw@src.gnome.org>2002-08-06 05:04:30 +0800
commit01fb066a57ffdddeeae9b333f5bcbdcd169f5c75 (patch)
tree8f196877f08c72a914c937201e5e291de7ae4e8d
parentdcf5f55c1c44c0285bbaa977bb3714b22d530407 (diff)
downloadgsoc2013-evolution-01fb066a57ffdddeeae9b333f5bcbdcd169f5c75.tar
gsoc2013-evolution-01fb066a57ffdddeeae9b333f5bcbdcd169f5c75.tar.gz
gsoc2013-evolution-01fb066a57ffdddeeae9b333f5bcbdcd169f5c75.tar.bz2
gsoc2013-evolution-01fb066a57ffdddeeae9b333f5bcbdcd169f5c75.tar.lz
gsoc2013-evolution-01fb066a57ffdddeeae9b333f5bcbdcd169f5c75.tar.xz
gsoc2013-evolution-01fb066a57ffdddeeae9b333f5bcbdcd169f5c75.tar.zst
gsoc2013-evolution-01fb066a57ffdddeeae9b333f5bcbdcd169f5c75.zip
Add a GHashTable pointer so we can remove the info once the operation is
2002-08-01 Peter Williams <peterw@ximian.com> * mail-offline-handler.c (struct _sync_info): Add a GHashTable pointer so we can remove the info once the operation is done. (sync_done): Remove the info from the hash table. (impl_syncFolder): Save the table to which the info was added. svn path=/trunk/; revision=17701
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-offline-handler.c3
2 files changed, 10 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index cd1ef2f6f2..4fa2a6ba02 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2002-08-01 Peter Williams <peterw@ximian.com>
+
+ * mail-offline-handler.c (struct _sync_info): Add a GHashTable pointer
+ so we can remove the info once the operation is done.
+ (sync_done): Remove the info from the hash table.
+ (impl_syncFolder): Save the table to which the info was added.
+
2002-08-05 Jeffrey Stedfast <fejj@ximian.com>
* component-factory.c (user_create_new_item_cb): Updated to call
diff --git a/mail/mail-offline-handler.c b/mail/mail-offline-handler.c
index 7b7aa94c4d..2c571d47f7 100644
--- a/mail/mail-offline-handler.c
+++ b/mail/mail-offline-handler.c
@@ -115,6 +115,7 @@ struct _sync_info {
int pc; /* percent complete (0-100) */
int lastpc; /* last percent reported, so we dont overreport */
int id; /* timeout id */
+ GHashTable *table; /* the hashtable that we're registered in */
};
static void
@@ -179,6 +180,7 @@ sync_done(const char *uri, void *crap)
CORBA_Object_release(info->listener, &ev);
CORBA_exception_free(&ev);
+ g_hash_table_remove (info->table, info->uri);
g_free(info->uri);
camel_operation_unref(info->cancel);
g_free(info);
@@ -203,6 +205,7 @@ impl_syncFolder (PortableServer_Servant servant,
info->uri = g_strdup(folder->physicalUri);
info->id = g_timeout_add(500, (GSourceFunc)sync_timeout, info);
info->cancel = camel_operation_new(sync_status, info);
+ info->table = priv->sync_table;
g_hash_table_insert(priv->sync_table, info->uri, info);