evolution-data-server r9487 - trunk/camel



Author: pebolle
Date: Fri Sep  5 19:56:21 2008
New Revision: 9487
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9487&view=rev

Log:
2008-09-05  Paul Bolle  <pebolle tiscali nl>

        ** Fix for bug #550412

        * camel-store.c: (camel_store_get_folder) (camel_store_create_folder)
        (camel_store_get_folder_info): Mention NULL return in documentation.
        * camel-store.c: (camel_store_free_folder_info): Make sure that a NULL
        CamelFolderInfo is always gracefully handled. Document that.



Modified:
   trunk/camel/ChangeLog
   trunk/camel/camel-store.c

Modified: trunk/camel/camel-store.c
==============================================================================
--- trunk/camel/camel-store.c	(original)
+++ trunk/camel/camel-store.c	Fri Sep  5 19:56:21 2008
@@ -283,7 +283,7 @@
  *
  * Get a specific folder object from the store by name.
  *
- * Returns: the folder corresponding to the path @folder_name.
+ * Returns: the folder corresponding to the path @folder_name or %NULL.
  **/
 CamelFolder *
 camel_store_get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
@@ -382,7 +382,7 @@
  * @parent_name can be %NULL to create a new top-level folder.
  *
  * Returns: info about the created folder, which the caller must
- * free with #camel_store_free_folder_info
+ * free with #camel_store_free_folder_info, or %NULL.
  **/
 CamelFolderInfo *
 camel_store_create_folder (CamelStore *store, const char *parent_name,
@@ -839,7 +839,7 @@
  * counts is to both open the folder and invoke refresh_info() it.
  *
  * Returns: a #CamelFolderInfo tree, which must be freed with
- * #camel_store_free_folder_info
+ * #camel_store_free_folder_info, or %NULL.
  **/
 CamelFolderInfo *
 camel_store_get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelException *ex)
@@ -882,13 +882,17 @@
  * @store: a #CamelStore object
  * @fi: a #CamelFolderInfo as gotten via #camel_store_get_folder_info
  *
- * Frees the data returned by #camel_store_get_folder_info
+ * Frees the data returned by #camel_store_get_folder_info. If @fi is %NULL,
+ * nothing is done, the routine simply returns.
  **/
 void
 camel_store_free_folder_info (CamelStore *store, CamelFolderInfo *fi)
 {
 	g_return_if_fail (CAMEL_IS_STORE (store));
 
+	if (!fi)
+		return;
+
 	CS_CLASS (store)->free_folder_info (store, fi);
 }
 



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