aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/publish-calendar
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-06-18 13:15:58 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-06-18 13:15:58 +0800
commitdffd9d69efa547950e32ae3bfb291e0c527bf580 (patch)
tree0a1b4728aed9f889686a8f196f8d469081e44cd4 /plugins/publish-calendar
parent2c260daf732ba0ae86fbd1d9e43f3e7098e68721 (diff)
downloadgsoc2013-evolution-dffd9d69efa547950e32ae3bfb291e0c527bf580.tar
gsoc2013-evolution-dffd9d69efa547950e32ae3bfb291e0c527bf580.tar.gz
gsoc2013-evolution-dffd9d69efa547950e32ae3bfb291e0c527bf580.tar.bz2
gsoc2013-evolution-dffd9d69efa547950e32ae3bfb291e0c527bf580.tar.lz
gsoc2013-evolution-dffd9d69efa547950e32ae3bfb291e0c527bf580.tar.xz
gsoc2013-evolution-dffd9d69efa547950e32ae3bfb291e0c527bf580.tar.zst
gsoc2013-evolution-dffd9d69efa547950e32ae3bfb291e0c527bf580.zip
Fix for bug #437584
svn path=/trunk/; revision=33697
Diffstat (limited to 'plugins/publish-calendar')
-rw-r--r--plugins/publish-calendar/ChangeLog8
-rw-r--r--plugins/publish-calendar/publish-location.c72
2 files changed, 43 insertions, 37 deletions
diff --git a/plugins/publish-calendar/ChangeLog b/plugins/publish-calendar/ChangeLog
index 2af4178446..9b98cc2b79 100644
--- a/plugins/publish-calendar/ChangeLog
+++ b/plugins/publish-calendar/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-07 Gilles Dartiguelongue <dartigug@esiee.fr>
+
+ * publish-location.c: (migrateURI), (e_publish_uri_from_xml),
+ (e_publish_uri_to_xml): more compilation warnings cleanup,
+ completes bug #437584 fixes
+
2007-05-12 Matthew Barnes <mbarnes@redhat.com>
* Makefile.am: Add "eplug" file to CLEANFILES.
@@ -5,7 +11,7 @@
2007-05-11 Gilles Dartiguelongue <dartigug@esiee.fr>
* url-editor-dialog.c: (set_from_uri): fixes casts in strcmp,
- fixes par of bug #437584
+ fixes part of bug #437584
2007-03-20 Matthew Barnes <mbarnes@redhat.com>
diff --git a/plugins/publish-calendar/publish-location.c b/plugins/publish-calendar/publish-location.c
index fef67e7a08..a88fb295aa 100644
--- a/plugins/publish-calendar/publish-location.c
+++ b/plugins/publish-calendar/publish-location.c
@@ -54,40 +54,40 @@ migrateURI (const gchar *xml, xmlDocPtr doc)
uri = g_new0 (EPublishUri, 1);
root = doc->children;
- location = xmlGetProp (root, "location");
- enabled = xmlGetProp (root, "enabled");
- frequency = xmlGetProp (root, "frequency");
- username = xmlGetProp (root, "username");
+ location = xmlGetProp (root, (const unsigned char *)"location");
+ enabled = xmlGetProp (root, (const unsigned char *)"enabled");
+ frequency = xmlGetProp (root, (const unsigned char *)"frequency");
+ username = xmlGetProp (root, (const unsigned char *)"username");
- vfs_uri = gnome_vfs_uri_new (location);
+ vfs_uri = gnome_vfs_uri_new ((char *)location);
if (!vfs_uri) {
g_warning ("Could not form the uri for %s \n", location);
goto cleanup;
}
- gnome_vfs_uri_set_user_name (vfs_uri, username);
+ gnome_vfs_uri_set_user_name ((GnomeVFSURI *)vfs_uri, (char *)username);
temp = gnome_vfs_uri_to_string (vfs_uri, GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD | GNOME_VFS_URI_HIDE_PASSWORD);
uri->location = g_strdup_printf ("dav://%s", temp);
g_free (temp);
gnome_vfs_uri_unref (vfs_uri);
if (enabled != NULL)
- uri->enabled = atoi (enabled);
+ uri->enabled = atoi ((char *)enabled);
if (frequency != NULL)
- uri->publish_frequency = atoi (frequency);
+ uri->publish_frequency = atoi ((char *)frequency);
uri->publish_format = URI_PUBLISH_AS_FB;
- password = e_passwords_get_password ("Calendar", location);
+ password = e_passwords_get_password ("Calendar", (char *)location);
if (password) {
- e_passwords_forget_password ("Calendar", location);
+ e_passwords_forget_password ("Calendar", (char *)location);
e_passwords_add_password (uri->location, password);
e_passwords_remember_password ("Calendar", uri->location);
}
for (p = root->children; p != NULL; p = p->next) {
- xmlChar *uid = xmlGetProp (p, "uid");
- if (strcmp (p->name, "source") == 0) {
+ xmlChar *uid = xmlGetProp (p, (const unsigned char *)"uid");
+ if (strcmp ((char *)p->name, "source") == 0) {
events = g_slist_append (events, uid);
} else {
g_free (uid);
@@ -121,15 +121,15 @@ e_publish_uri_from_xml (const gchar *xml)
GSList *events = NULL;
EPublishUri *uri;
- doc = xmlParseDoc ((char *) xml);
+ doc = xmlParseDoc ((const unsigned char *)xml);
if (doc == NULL)
return NULL;
root = doc->children;
- if (strcmp (root->name, "uri") != 0)
+ if (strcmp ((char *)root->name, "uri") != 0)
return NULL;
- if ((username = xmlGetProp (root, "username"))) {
+ if ((username = xmlGetProp (root, (const unsigned char *)"username"))) {
xmlFree (username);
return migrateURI (xml, doc);
@@ -137,28 +137,28 @@ e_publish_uri_from_xml (const gchar *xml)
uri = g_new0 (EPublishUri, 1);
- location = xmlGetProp (root, "location");
- enabled = xmlGetProp (root, "enabled");
- frequency = xmlGetProp (root, "frequency");
- format = xmlGetProp (root, "format");
- publish_time = xmlGetProp (root, "publish_time");
+ location = xmlGetProp (root, (const unsigned char *)"location");
+ enabled = xmlGetProp (root, (const unsigned char *)"enabled");
+ frequency = xmlGetProp (root, (const unsigned char *)"frequency");
+ format = xmlGetProp (root, (const unsigned char *)"format");
+ publish_time = xmlGetProp (root, (const unsigned char *)"publish_time");
if (location != NULL)
- uri->location = location;
+ uri->location = (char *)location;
if (enabled != NULL)
- uri->enabled = atoi (enabled);
+ uri->enabled = atoi ((char *)enabled);
if (frequency != NULL)
- uri->publish_frequency = atoi (frequency);
+ uri->publish_frequency = atoi ((char *)frequency);
if (format != NULL)
- uri->publish_format = atoi (format);
+ uri->publish_format = atoi ((char *)format);
if (publish_time != NULL)
- uri->last_pub_time = publish_time;
+ uri->last_pub_time = (char *)publish_time;
uri->password = g_strdup ("");
for (p = root->children; p != NULL; p = p->next) {
- xmlChar *uid = xmlGetProp (p, "uid");
- if (strcmp (p->name, "event") == 0) {
+ xmlChar *uid = xmlGetProp (p, (const unsigned char *)"uid");
+ if (strcmp ((char *)p->name, "event") == 0) {
events = g_slist_append (events, uid);
} else {
g_free (uid);
@@ -188,22 +188,22 @@ e_publish_uri_to_xml (EPublishUri *uri)
g_return_val_if_fail (uri != NULL, NULL);
g_return_val_if_fail (uri->location != NULL, NULL);
- doc = xmlNewDoc ("1.0");
+ doc = xmlNewDoc ((const unsigned char *)"1.0");
- root = xmlNewDocNode (doc, NULL, "uri", NULL);
+ root = xmlNewDocNode (doc, NULL, (const unsigned char *)"uri", NULL);
enabled = g_strdup_printf ("%d", uri->enabled);
frequency = g_strdup_printf ("%d", uri->publish_frequency);
format = g_strdup_printf ("%d", uri->publish_format);
- xmlSetProp (root, "location", uri->location);
- xmlSetProp (root, "enabled", enabled);
- xmlSetProp (root, "frequency", frequency);
- xmlSetProp (root, "format", format);
- xmlSetProp (root, "publish_time", uri->last_pub_time);
+ xmlSetProp (root, (const unsigned char *)"location", (unsigned char *)uri->location);
+ xmlSetProp (root, (const unsigned char *)"enabled", (unsigned char *)enabled);
+ xmlSetProp (root, (const unsigned char *)"frequency", (unsigned char *)frequency);
+ xmlSetProp (root, (const unsigned char *)"format", (unsigned char *)format);
+ xmlSetProp (root, (const unsigned char *)"publish_time", (unsigned char *)uri->last_pub_time);
for (calendars = uri->events; calendars != NULL; calendars = g_slist_next (calendars)) {
xmlNodePtr node;
- node = xmlNewChild (root, NULL, "event", NULL);
- xmlSetProp (node, "uid", calendars->data);
+ node = xmlNewChild (root, NULL, (const unsigned char *)"event", NULL);
+ xmlSetProp (node, (const unsigned char *)"uid", calendars->data);
}
xmlDocSetRootElement (doc, root);