aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);