gvfs r1103 - in trunk: . client daemon
- From: danw svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r1103 - in trunk: . client daemon
- Date: Fri, 11 Jan 2008 19:33:34 +0000 (GMT)
Author: danw
Date: Fri Jan 11 19:33:34 2008
New Revision: 1103
URL: http://svn.gnome.org/viewvc/gvfs?rev=1103&view=rev
Log:
* daemon/soup-input-stream.c (soup_input_stream_send)
(wrapper_callback, soup_input_stream_send_async): Fix for changes
to g_input_stream_set_pending() since I wrote this.
* client/gdaemonfile.c (g_daemon_file_hash): x86_64 fix.
Modified:
trunk/ChangeLog
trunk/client/gdaemonfile.c
trunk/daemon/soup-input-stream.c
Modified: trunk/client/gdaemonfile.c
==============================================================================
--- trunk/client/gdaemonfile.c (original)
+++ trunk/client/gdaemonfile.c Fri Jan 11 19:33:34 2008
@@ -309,7 +309,7 @@
return
g_str_hash (daemon_file->path) ^
- (guint32)daemon_file->mount_spec; /* We have unique mount_spec objects so hash directly on it */
+ G_POINTER_TO_UINT (daemon_file->mount_spec); /* We have unique mount_spec objects so hash directly on it */
}
static gboolean
Modified: trunk/daemon/soup-input-stream.c
==============================================================================
--- trunk/daemon/soup-input-stream.c (original)
+++ trunk/daemon/soup-input-stream.c Fri Jan 11 19:33:34 2008
@@ -422,17 +422,10 @@
g_return_val_if_fail (SOUP_IS_INPUT_STREAM (stream), FALSE);
priv = SOUP_INPUT_STREAM_GET_PRIVATE (stream);
- if (g_input_stream_has_pending (stream))
- {
- /* FIXME: should get this error message from gio */
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_PENDING,
- "Stream has outstanding operation");
+ if (!g_input_stream_set_pending (stream, error))
return FALSE;
- }
-
- g_input_stream_set_pending (stream, TRUE);
result = soup_input_stream_send_internal (stream, cancellable, error);
- g_input_stream_set_pending (stream, FALSE);
+ g_input_stream_clear_pending (stream);
return result;
}
@@ -495,7 +488,7 @@
GInputStream *stream = G_INPUT_STREAM (source_object);
SoupInputStreamPrivate *priv = SOUP_INPUT_STREAM_GET_PRIVATE (stream);
- g_input_stream_set_pending (stream, FALSE);
+ g_input_stream_clear_pending (stream);
if (priv->outstanding_callback)
(*priv->outstanding_callback) (source_object, res, user_data);
priv->outstanding_callback = NULL;
@@ -605,21 +598,20 @@
gpointer user_data)
{
SoupInputStreamPrivate *priv = SOUP_INPUT_STREAM_GET_PRIVATE (stream);
+ GError *error = NULL;
g_return_if_fail (SOUP_IS_INPUT_STREAM (stream));
priv = SOUP_INPUT_STREAM_GET_PRIVATE (stream);
- if (g_input_stream_has_pending (stream))
+ if (!g_input_stream_set_pending (stream, &error))
{
- /* FIXME: should get this error message from gio */
- g_simple_async_report_error_in_idle (G_OBJECT (stream),
- callback,
- user_data,
- G_IO_ERROR, G_IO_ERROR_PENDING,
- "Stream has outstanding operation");
+ g_simple_async_report_gerror_in_idle (G_OBJECT (stream),
+ callback,
+ user_data,
+ error);
+ g_error_free (error);
return;
}
- g_input_stream_set_pending (stream, TRUE);
soup_input_stream_send_async_internal (stream, io_priority, cancellable,
callback, user_data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]