gmime r1362 - in trunk: . gmime tests



Author: fejj
Date: Fri Jun 20 13:33:41 2008
New Revision: 1362
URL: http://svn.gnome.org/viewvc/gmime?rev=1362&view=rev

Log:
2008-06-20  Jeffrey Stedfast  <fejj novell com>

	* gmime/gmime-multipart.c (g_mime_multipart_remove_part): Fixed
	g_return macros to return bool instead of void.

	* gmime/gmime-cipher-context.c (g_mime_signer_get_errors): Fixed
	the function name to match the prototype name.

	* gmime/gmime-header.c (g_mime_header_list_remove): Fixed the
	g_return macros here too. Also need to make sure to return TRUE at
	the end of the function.

	* gmime/gmime-part.c (write_content): Don't unred filtered_stream
	if we haven't used it.

	* gmime/gmime-object.c (g_mime_object_remove_header): Fixed
	g_return macros, this function returns bool, not void.

	* gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Get rid of
	unused variable.



Modified:
   trunk/ChangeLog
   trunk/gmime/gmime-cipher-context.c
   trunk/gmime/gmime-gpg-context.c
   trunk/gmime/gmime-header.c
   trunk/gmime/gmime-multipart.c
   trunk/gmime/gmime-object.c
   trunk/gmime/gmime-part.c
   trunk/tests/test-mime.c

Modified: trunk/gmime/gmime-cipher-context.c
==============================================================================
--- trunk/gmime/gmime-cipher-context.c	(original)
+++ trunk/gmime/gmime-cipher-context.c	Fri Jun 20 13:33:41 2008
@@ -527,7 +527,7 @@
  * Returns: the signer errors.
  **/
 GMimeSignerError
-g_mime_signer_get_error (GMimeSigner *signer)
+g_mime_signer_get_errors (GMimeSigner *signer)
 {
 	g_return_val_if_fail (signer != NULL, GMIME_SIGNER_ERROR_NONE);
 	

Modified: trunk/gmime/gmime-gpg-context.c
==============================================================================
--- trunk/gmime/gmime-gpg-context.c	(original)
+++ trunk/gmime/gmime-gpg-context.c	Fri Jun 20 13:33:41 2008
@@ -926,7 +926,7 @@
 	size_t nread, nwritten;
 	register char *inptr;
 	char *status, *tmp;
-	int id, len;
+	int len;
 	
  parse:
 	

Modified: trunk/gmime/gmime-header.c
==============================================================================
--- trunk/gmime/gmime-header.c	(original)
+++ trunk/gmime/gmime-header.c	Fri Jun 20 13:33:41 2008
@@ -695,8 +695,8 @@
 {
 	GMimeHeader *header, *node;
 	
-	g_return_if_fail (headers != NULL);
-	g_return_if_fail (name != NULL);
+	g_return_val_if_fail (headers != NULL, FALSE);
+	g_return_val_if_fail (name != NULL, FALSE);
 	
 	if (!(header = g_hash_table_lookup (headers->hash, name)))
 		return FALSE;
@@ -722,6 +722,8 @@
 	
 	g_free (headers->raw);
 	headers->raw = NULL;
+	
+	return TRUE;
 }
 
 

Modified: trunk/gmime/gmime-multipart.c
==============================================================================
--- trunk/gmime/gmime-multipart.c	(original)
+++ trunk/gmime/gmime-multipart.c	Fri Jun 20 13:33:41 2008
@@ -515,8 +515,8 @@
 gboolean
 g_mime_multipart_remove_part (GMimeMultipart *multipart, GMimeObject *part)
 {
-	g_return_if_fail (GMIME_IS_MULTIPART (multipart));
-	g_return_if_fail (GMIME_IS_OBJECT (part));
+	g_return_val_if_fail (GMIME_IS_MULTIPART (multipart), FALSE);
+	g_return_val_if_fail (GMIME_IS_OBJECT (part), FALSE);
 	
 	return GMIME_MULTIPART_GET_CLASS (multipart)->remove_part (multipart, part);
 }

Modified: trunk/gmime/gmime-object.c
==============================================================================
--- trunk/gmime/gmime-object.c	(original)
+++ trunk/gmime/gmime-object.c	Fri Jun 20 13:33:41 2008
@@ -54,6 +54,9 @@
 	GType object_type;
 };
 
+extern void _g_mime_object_content_type_changed (GMimeObject *object);
+extern void _g_mime_object_content_disposition_changed (GMimeObject *object);
+
 static void g_mime_object_class_init (GMimeObjectClass *klass);
 static void g_mime_object_init (GMimeObject *object, GMimeObjectClass *klass);
 static void g_mime_object_finalize (GObject *object);
@@ -799,8 +802,8 @@
 gboolean
 g_mime_object_remove_header (GMimeObject *object, const char *header)
 {
-	g_return_if_fail (GMIME_IS_OBJECT (object));
-	g_return_if_fail (header != NULL);
+	g_return_val_if_fail (GMIME_IS_OBJECT (object), FALSE);
+	g_return_val_if_fail (header != NULL, FALSE);
 	
 	return GMIME_OBJECT_GET_CLASS (object)->remove_header (object, header);
 }

Modified: trunk/gmime/gmime-part.c
==============================================================================
--- trunk/gmime/gmime-part.c	(original)
+++ trunk/gmime/gmime-part.c	Fri Jun 20 13:33:41 2008
@@ -320,10 +320,8 @@
 			filename = g_mime_part_get_filename (part);
 			nwritten = g_mime_stream_printf (stream, "begin 0644 %s\n",
 							 filename ? filename : "unknown");
-			if (nwritten == -1) {
-				g_object_unref (filtered_stream);
+			if (nwritten == -1)
 				return -1;
-			}
 			
 			total += nwritten;
 			

Modified: trunk/tests/test-mime.c
==============================================================================
--- trunk/tests/test-mime.c	(original)
+++ trunk/tests/test-mime.c	Fri Jun 20 13:33:41 2008
@@ -213,6 +213,9 @@
 	{ "Sat, 24 Mar 2007 21:23:03 GMT",
 	  "Sat, 24 Mar 2007 21:23:03 +0000",
 	  1174771383, 0 },
+	{ "17-6-2008 17:10:08",
+	  "Tue, 17 Jun 2008 17:10:08 +0000",
+	  1213722608, 0 },
 };
 
 static void



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