Re: [evolution-patches] [EDS-libedataserver] Fix for #271969
- From: Veerapuram Varadhan <vvaradhan novell com>
- To: Evo-patches <evolution-patches lists ximian com>
- Subject: Re: [evolution-patches] [EDS-libedataserver] Fix for #271969
- Date: Thu, 11 Aug 2005 13:09:07 -0600
Hi,
Attached is the revised patch for 271969.
Thanks,
V. Varadhan
On Wed, 2005-08-03 at 17:59 -0600, Veerapuram Varadhan wrote:
> Ok to commit?
>
> Thanks,
>
> V. Varadhan
>
> On Mon, 2005-08-01 at 21:08 -0600, Veerapuram Varadhan wrote:
> > Hi,
> >
> > Attached patch is taken from
> > http://bugzilla.gnome.org/show_bug.cgi?id=271969
> >
> > Refer to the bug for more-details.
> >
> > The patch looks good to me, however, would like to request for an
> > expert's review comments/suggestion. :-)
> >
> >
> > Thanks,
> >
> > V. Varadhan
> >
> >
> >
> > _______________________________________________
> > evolution-patches mailing list
> > evolution-patches lists ximian com
> > http://lists.ximian.com/mailman/listinfo/evolution-patches
> _______________________________________________
> evolution-patches mailing list
> evolution-patches lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-patches
--- ./calendar/backends/file/e-cal-backend-file.c 2005-08-10 20:23:29.581372077 +0530
+++ ../evolution-data-server/calendar/backends/file/e-cal-backend-file.c 2005-08-10 20:33:35.470206679 +0530
@@ -1477,7 +1477,7 @@
EXmlHash *ehash;
} ECalBackendFileComputeChangesData;
-static void
+static gboolean
e_cal_backend_file_compute_changes_foreach_key (const char *key, gpointer value, gpointer data)
{
ECalBackendFileComputeChangesData *be_data = data;
@@ -1494,8 +1494,9 @@
e_cal_component_set_uid (comp, key);
be_data->deletes = g_list_prepend (be_data->deletes, e_cal_component_get_as_string (comp));
- e_xmlhash_remove (be_data->ehash, key);
+ return TRUE;
}
+ return FALSE;
}
static ECalBackendSyncStatus
@@ -1555,7 +1556,7 @@
be_data.deletes = NULL;
be_data.ehash = ehash;
- e_xmlhash_foreach_key (ehash, (EXmlHashFunc)e_cal_backend_file_compute_changes_foreach_key, &be_data);
+ e_xmlhash_foreach_key_remove (ehash, (EXmlHashRemoveFunc)e_cal_backend_file_compute_changes_foreach_key, &be_data);
*deletes = be_data.deletes;
--- ./libedataserver/e-xml-hash-utils.c 2005-08-10 20:27:58.591097540 +0530
+++ ../evolution-data-server/libedataserver/e-xml-hash-utils.c 2005-08-10 21:17:29.849097033 +0530
@@ -319,6 +319,15 @@
g_hash_table_foreach (hash->objects, foreach_hash_func, &data);
}
+void
+e_xmlhash_foreach_key_remove (EXmlHash *hash, EXmlHashRemoveFunc func, gpointer user_data)
+{
+ g_return_if_fail (hash != NULL);
+ g_return_if_fail (func != NULL);
+
+ g_hash_table_foreach_remove (hash->objects, func, user_data);
+}
+
/**
* e_xmlhash_write:
* @hash: The #EXmlHash to write.
--- ./libedataserver/e-xml-hash-utils.h 2005-08-10 20:28:41.766600057 +0530
+++ ../evolution-data-server/libedataserver/e-xml-hash-utils.h 2005-08-10 21:34:39.794874196 +0530
@@ -58,6 +58,7 @@
} EXmlHashStatus;
typedef void (* EXmlHashFunc) (const char *key, const char *value, gpointer user_data);
+typedef gboolean (* EXmlHashRemoveFunc) (const char *key, const char *value, gpointer user_data);
typedef struct EXmlHash EXmlHash;
@@ -75,6 +76,9 @@
void e_xmlhash_foreach_key (EXmlHash *hash,
EXmlHashFunc func,
gpointer user_data);
+void e_xmlhash_foreach_key_remove (EXmlHash *hash,
+ EXmlHashRemoveFunc func,
+ gpointer user_data);
void e_xmlhash_write (EXmlHash *hash);
void e_xmlhash_destroy (EXmlHash *hash);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]