evolution-data-server r9005 - trunk/camel
- From: plaes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9005 - trunk/camel
- Date: Wed, 18 Jun 2008 19:45:54 +0000 (UTC)
Author: plaes
Date: Wed Jun 18 19:45:54 2008
New Revision: 9005
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9005&view=rev
Log:
2008-06-18 Priit Laes <plaes plaes org>
** Fix a regression introduced with bug #534080
* camel-stream-vfs.c: (stream_write):
Return correct bytes_written on success and -1 on error.
Modified:
trunk/camel/ChangeLog
trunk/camel/camel-stream-vfs.c
Modified: trunk/camel/camel-stream-vfs.c
==============================================================================
--- trunk/camel/camel-stream-vfs.c (original)
+++ trunk/camel/camel-stream-vfs.c Wed Jun 18 19:45:54 2008
@@ -211,20 +211,20 @@
static ssize_t
stream_write (CamelStream *stream, const char *buffer, size_t n)
{
- gssize nwritten;
+ gboolean success;
+ gsize bytes_written;
GError *error = NULL;
CamelStreamVFS *stream_vfs = CAMEL_STREAM_VFS (stream);
g_return_val_if_fail (G_IS_OUTPUT_STREAM (stream_vfs->stream), 0);
- nwritten = g_output_stream_write_all (G_OUTPUT_STREAM (stream_vfs->stream), buffer, n, NULL, NULL, &error);
+ success = g_output_stream_write_all (G_OUTPUT_STREAM (stream_vfs->stream), buffer, n, &bytes_written, NULL, &error);
if (error) {
g_warning ("%s", error->message);
g_error_free (error);
}
-
- return nwritten;
+ return success ? bytes_written : -1;
}
static int
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]