evolution-mapi r187 - in trunk/src: account-setup-eplugin addressbook camel libexchangemapi



Author: mcrha
Date: Thu Mar 19 09:58:07 2009
New Revision: 187
URL: http://svn.gnome.org/viewvc/evolution-mapi?rev=187&view=rev

Log:
2009-03-19  Milan Crha  <mcrha redhat com>

	** Fix for bug #574784

	* src/addressbook/e-book-backend-mapi.c: (e_book_backend_mapi_load_source):
	* src/libexchangemapi/exchange-mapi-connection.c: (exchange_mapi_util_check_restriction),
	(exchange_mapi_connection_fetch_items), (exchange_mapi_empty_folder),
	(exchange_mapi_connection_fetch_item), (exchange_mapi_create_folder),
	(exchange_mapi_remove_folder), (exchange_mapi_remove_folder),
	(get_child_folders):
	* src/libexchangemapi/exchange-mapi-utils.c: (exchange_mapi_util_mapi_id_to_string),
	(exchange_mapi_util_mapi_id_from_string),
	(exchange_mapi_util_mapi_ids_to_uid),
	(exchange_mapi_util_mapi_ids_from_uid),
	(exchange_mapi_debug_property_dump):
	* src/libexchangemapi/exchange-mapi-folder.c: (exchange_mapi_folder_get_folder):
	* src/camel/camel-mapi-store.c: (mapi_create_folder), (mapi_convert_to_folder_info), (mapi_folders_sync):
	* src/camel/camel-mapi-folder.c: (mapi_sync):
	* src/account-setup-eplugin/exchange-mapi-account-setup.c: (exchange_mapi_book_commit):
	Use proper formatting modifier for IDs.



Modified:
   trunk/src/account-setup-eplugin/ChangeLog
   trunk/src/account-setup-eplugin/exchange-mapi-account-setup.c
   trunk/src/addressbook/ChangeLog
   trunk/src/addressbook/e-book-backend-mapi.c
   trunk/src/camel/ChangeLog
   trunk/src/camel/camel-mapi-folder.c
   trunk/src/camel/camel-mapi-store.c
   trunk/src/libexchangemapi/ChangeLog
   trunk/src/libexchangemapi/exchange-mapi-connection.c
   trunk/src/libexchangemapi/exchange-mapi-folder.c
   trunk/src/libexchangemapi/exchange-mapi-utils.c

Modified: trunk/src/account-setup-eplugin/exchange-mapi-account-setup.c
==============================================================================
--- trunk/src/account-setup-eplugin/exchange-mapi-account-setup.c	(original)
+++ trunk/src/account-setup-eplugin/exchange-mapi-account-setup.c	Thu Mar 19 09:58:07 2009
@@ -457,7 +457,7 @@
 	exchange_mapi_util_mapi_id_from_string (sfid, &pfid);
 
 	fid = exchange_mapi_create_folder (olFolderContacts, pfid, e_source_peek_name (source));
-	g_print("Created %016" G_GUINT64_FORMAT "X\n", fid);
+	g_print("Created %016" G_GINT64_MODIFIER "X\n", fid);
 	grp = e_source_peek_group (source);
 	e_source_set_property (source, "auth", "plain/password");
 	e_source_set_property (source, "auth-domain", EXCHANGE_MAPI_PASSWORD_COMPONENT);

Modified: trunk/src/addressbook/e-book-backend-mapi.c
==============================================================================
--- trunk/src/addressbook/e-book-backend-mapi.c	(original)
+++ trunk/src/addressbook/e-book-backend-mapi.c	Thu Mar 19 09:58:07 2009
@@ -387,7 +387,7 @@
 	exchange_mapi_util_mapi_id_from_string (e_source_get_property (source, "folder-id"), &priv->fid);
 
 	tmp = e_source_get_property (source, "folder-id");
-	printf("Folder is %s %016" G_GUINT64_FORMAT "X\n", tmp, priv->fid);
+	printf("Folder is %s %016" G_GINT64_MODIFIER "X\n", tmp, priv->fid);
 
 	/* Once aunthentication in address book works this can be removed */
 	if (priv->mode == GNOME_Evolution_Addressbook_MODE_LOCAL) {
@@ -400,7 +400,7 @@
 
 
 	if (enable_debug)
-		printf("For profile %s and folder %s - %016" G_GUINT64_FORMAT "X\n", priv->profile, tmp, priv->fid);
+		printf("For profile %s and folder %s - %016" G_GINT64_MODIFIER "X\n", priv->profile, tmp, priv->fid);
 
 	return GNOME_Evolution_Addressbook_Success;
 }

Modified: trunk/src/camel/camel-mapi-folder.c
==============================================================================
--- trunk/src/camel/camel-mapi-folder.c	(original)
+++ trunk/src/camel/camel-mapi-folder.c	Thu Mar 19 09:58:07 2009
@@ -534,7 +534,7 @@
 	}
 	/*Remove them from cache*/
 	while (deleted_items) {
-		char* deleted_msg_uid = g_strdup_printf ("%016" G_GUINT64_FORMAT "X%016" G_GUINT64_FORMAT "X", fid, *(mapi_id_t *)deleted_items->data);
+		char* deleted_msg_uid = g_strdup_printf ("%016" G_GINT64_MODIFIER "X%016" G_GINT64_MODIFIER "X", fid, *(mapi_id_t *)deleted_items->data);
 
 		CAMEL_MAPI_FOLDER_REC_LOCK (folder, cache_lock);
 		camel_folder_summary_remove_uid (folder->summary, deleted_msg_uid);

Modified: trunk/src/camel/camel-mapi-store.c
==============================================================================
--- trunk/src/camel/camel-mapi-store.c	(original)
+++ trunk/src/camel/camel-mapi-store.c	Thu Mar 19 09:58:07 2009
@@ -471,9 +471,9 @@
 		si = camel_mapi_store_summary_add_from_full(mapi_store->summary, root->full_name, '/');
 		camel_store_summary_save((CamelStoreSummary *)mapi_store->summary);
 
-		g_hash_table_insert (priv->id_hash, g_strdup_printf ("%016" G_GUINT64_FORMAT "X", new_folder_id), g_strdup(folder_name));
-		g_hash_table_insert (priv->name_hash, g_strdup(root->full_name), g_strdup_printf ("%016" G_GUINT64_FORMAT "X", new_folder_id));
-		g_hash_table_insert (priv->parent_hash, g_strdup_printf ("%016" G_GUINT64_FORMAT "X", new_folder_id), g_strdup(parent_id));
+		g_hash_table_insert (priv->id_hash, g_strdup_printf ("%016" G_GINT64_MODIFIER "X", new_folder_id), g_strdup(folder_name));
+		g_hash_table_insert (priv->name_hash, g_strdup(root->full_name), g_strdup_printf ("%016" G_GINT64_MODIFIER "X", new_folder_id));
+		g_hash_table_insert (priv->parent_hash, g_strdup_printf ("%016" G_GINT64_MODIFIER "X", new_folder_id), g_strdup(parent_id));
 
 		camel_object_trigger_event (CAMEL_OBJECT (store), "folder_created", root);
 	}
@@ -994,7 +994,7 @@
 
 	name = exchange_mapi_folder_get_name (folder);
 
-	id = g_strdup_printf ("%016" G_GUINT64_FORMAT "X", exchange_mapi_folder_get_fid (folder));
+	id = g_strdup_printf ("%016" G_GINT64_MODIFIER "X", exchange_mapi_folder_get_fid (folder));
 		
 	fi = g_new0 (CamelFolderInfo, 1);
 
@@ -1038,7 +1038,7 @@
 	 */
 
 	mapi_id_folder = exchange_mapi_folder_get_parent_id (folder);
-	parent = g_strdup_printf ("%016" G_GUINT64_FORMAT "X", mapi_id_folder);
+	parent = g_strdup_printf ("%016" G_GINT64_MODIFIER "X", mapi_id_folder);
 	par_name = g_hash_table_lookup (priv->id_hash, parent);
 
 	if (par_name != NULL) {
@@ -1144,8 +1144,8 @@
 		gchar *fid = NULL, *parent_id = NULL;
 
 		name = exchange_mapi_folder_get_name ((ExchangeMAPIFolder *)(temp_list->data));
-		fid = g_strdup_printf ("%016" G_GUINT64_FORMAT "X", exchange_mapi_folder_get_fid((ExchangeMAPIFolder *)(temp_list->data)));
-		parent_id = g_strdup_printf ("%016" G_GUINT64_FORMAT "X", exchange_mapi_folder_get_parent_id ((ExchangeMAPIFolder *)(temp_list->data)));
+		fid = g_strdup_printf ("%016" G_GINT64_MODIFIER "X", exchange_mapi_folder_get_fid((ExchangeMAPIFolder *)(temp_list->data)));
+		parent_id = g_strdup_printf ("%016" G_GINT64_MODIFIER "X", exchange_mapi_folder_get_parent_id ((ExchangeMAPIFolder *)(temp_list->data)));
 
 		/*id_hash returns the name for a given container id*/
 		g_hash_table_insert (priv->id_hash, g_strdup (fid), g_strdup(name)); 

Modified: trunk/src/libexchangemapi/exchange-mapi-connection.c
==============================================================================
--- trunk/src/libexchangemapi/exchange-mapi-connection.c	(original)
+++ trunk/src/libexchangemapi/exchange-mapi-connection.c	Thu Mar 19 09:58:07 2009
@@ -892,7 +892,7 @@
 	uint32_t count, i;
 	GSList *mids = NULL;
 
-	d(g_print("\n%s: Entering %s: folder-id %016" G_GUINT64_FORMAT "X ", G_STRLOC, G_STRFUNC, fid));
+	d(g_print("\n%s: Entering %s: folder-id %016" G_GINT64_MODIFIER "X ", G_STRLOC, G_STRFUNC, fid));
 
 	LOCK();
 	LOGALL();
@@ -1007,7 +1007,7 @@
 	uint32_t count, i, cursor_pos = 0;
 	gboolean result = FALSE;
 
-	d(g_print("\n%s: Entering %s: folder-id %016" G_GUINT64_FORMAT "X ", G_STRLOC, G_STRFUNC, fid));
+	d(g_print("\n%s: Entering %s: folder-id %016" G_GINT64_MODIFIER "X ", G_STRLOC, G_STRFUNC, fid));
 
 	LOCK();
 	LOGALL();
@@ -1230,7 +1230,7 @@
 	LOGNONE();
 	UNLOCK();
 
-	d(g_print("\n%s: Leaving %s: folder-id %016" G_GUINT64_FORMAT "X ", G_STRLOC, G_STRFUNC, fid));
+	d(g_print("\n%s: Leaving %s: folder-id %016" G_GINT64_MODIFIER "X ", G_STRLOC, G_STRFUNC, fid));
 
 	return result;
 }
@@ -1254,7 +1254,7 @@
 	GSList *stream_list = NULL;
 	gboolean result = FALSE;
 
-	d(g_print("\n%s: Entering %s: folder-id %016" G_GUINT64_FORMAT "X message-id %016" G_GUINT64_FORMAT "X",
+	d(g_print("\n%s: Entering %s: folder-id %016" G_GINT64_MODIFIER "X message-id %016" G_GINT64_MODIFIER "X",
 				G_STRLOC, G_STRFUNC, fid, mid));
 
 	LOCK();
@@ -1476,7 +1476,7 @@
 	}
 
 	fid = mapi_object_get_id (&obj_folder);
-	g_print("\nFolder %s created with id %016" G_GUINT64_FORMAT "X ", name, fid);
+	g_print("\nFolder %s created with id %016" G_GINT64_MODIFIER "X ", name, fid);
 
 cleanup:
 	mapi_object_release(&obj_folder);
@@ -1526,7 +1526,7 @@
 		goto cleanup;
 	}
 
-	g_print("\nFolder with id %016" G_GUINT64_FORMAT "X was emptied ", fid);
+	g_print("\nFolder with id %016" G_GINT64_MODIFIER "X was emptied ", fid);
 
 	result = TRUE;
 
@@ -1587,7 +1587,7 @@
 		goto cleanup;
 	}
 
-	g_print("\nFolder with id %016" G_GUINT64_FORMAT "X was emptied ", fid);
+	g_print("\nFolder with id %016" G_GINT64_MODIFIER "X was emptied ", fid);
 
 	/* Attempt to open the top/parent folder */
 	retval = OpenFolder(&obj_store, folder->parent_folder_id, &obj_top);
@@ -1603,7 +1603,7 @@
 		goto cleanup;
 	}
 
-	g_print("\nFolder with id %016" G_GUINT64_FORMAT "X was deleted ", fid);
+	g_print("\nFolder with id %016" G_GINT64_MODIFIER "X was deleted ", fid);
 
 	result = TRUE;
 
@@ -2494,7 +2494,7 @@
 			class = IPF_NOTE;
 
 		newname = utf8tolinux (name);
-		g_print("\n|---+ %-15s : (Container class: %s %016" G_GUINT64_FORMAT "X) UnRead : %d Total : %d ", newname, class, *fid, unread ? *unread : 0, total ? *total : 0);
+		g_print("\n|---+ %-15s : (Container class: %s %016" G_GINT64_MODIFIER "X) UnRead : %d Total : %d ", newname, class, *fid, unread ? *unread : 0, total ? *total : 0);
 
 		folder = exchange_mapi_folder_new (newname, class, folder_hier, *fid, folder_id, child ? *child : 0, unread ? *unread : 0, total ? *total : 0);
 		*mapi_folders = g_slist_prepend (*mapi_folders, folder);

Modified: trunk/src/libexchangemapi/exchange-mapi-folder.c
==============================================================================
--- trunk/src/libexchangemapi/exchange-mapi-folder.c	(original)
+++ trunk/src/libexchangemapi/exchange-mapi-folder.c	Thu Mar 19 09:58:07 2009
@@ -152,7 +152,7 @@
 	tmp = folder_list;
 	while (tmp) {
 		ExchangeMAPIFolder * folder = tmp->data;
-		g_print ("%016" G_GUINT64_FORMAT "X %016" G_GUINT64_FORMAT "X\n", folder->folder_id, fid);
+		g_print ("%016" G_GINT64_MODIFIER "X %016" G_GINT64_MODIFIER "X\n", folder->folder_id, fid);
 		if (folder->folder_id == fid)
 			return folder;
 		tmp=tmp->next;

Modified: trunk/src/libexchangemapi/exchange-mapi-utils.c
==============================================================================
--- trunk/src/libexchangemapi/exchange-mapi-utils.c	(original)
+++ trunk/src/libexchangemapi/exchange-mapi-utils.c	Thu Mar 19 09:58:07 2009
@@ -64,7 +64,7 @@
 inline gchar *
 exchange_mapi_util_mapi_id_to_string (mapi_id_t id)
 {
-	return g_strdup_printf ("%016" G_GUINT64_FORMAT "X", id);
+	return g_strdup_printf ("%016" G_GINT64_MODIFIER "X", id);
 }
 
 inline gboolean 
@@ -73,18 +73,18 @@
 	gint n = 0;
 
 	if (str && *str)
-		n = sscanf (str, "%016" G_GUINT64_FORMAT "X", id);
+		n = sscanf (str, "%016" G_GINT64_MODIFIER "X", id);
 
 	return (n == 1);
 }
 
 /* NOTE: We use the UID as a combination of the folder-id and the message-id. 
- * Specifically, it is in this format: ("%016" G_GUINT64_FORMAT "X%016" G_GUINT64_FORMAT "X", fid, mid).
+ * Specifically, it is in this format: ("%016" G_GINT64_MODIFIER "X%016" G_GINT64_MODIFIER "X", fid, mid).
  */
 inline gchar *
 exchange_mapi_util_mapi_ids_to_uid (mapi_id_t fid, mapi_id_t mid)
 {
-	return g_strdup_printf ("%016" G_GUINT64_FORMAT "X%016" G_GUINT64_FORMAT "X", fid, mid);
+	return g_strdup_printf ("%016" G_GINT64_MODIFIER "X%016" G_GINT64_MODIFIER "X", fid, mid);
 }
 
 inline gboolean 
@@ -93,7 +93,7 @@
 	gint n = 0;
 
 	if (str && *str)
-		n = sscanf (str, "%016" G_GUINT64_FORMAT "X%016" G_GUINT64_FORMAT "X", fid, mid);
+		n = sscanf (str, "%016" G_GINT64_MODIFIER "X%016" G_GINT64_MODIFIER "X", fid, mid);
 
 	return (n == 2);
 }
@@ -323,7 +323,7 @@
 				g_print (" (double) -  %lf", (double)lpProp->value.dbl);
 				break;
 			case PT_I8:
-				g_print (" (int) - 0x%016" G_GUINT64_FORMAT "X", lpProp->value.d);
+				g_print (" (int) - 0x%016" G_GINT64_MODIFIER "X", lpProp->value.d);
 				break;
 			case PT_SYSTIME: {
 					struct timeval t;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]