gvfs r1596 - in trunk: . daemon



Author: gicmo
Date: Thu Mar  6 23:51:32 2008
New Revision: 1596
URL: http://svn.gnome.org/viewvc/gvfs?rev=1596&view=rev

Log:
2008-03-07  Christian Kellner  <gicmo gnome org>

	* daemon/soup-input-stream.c: Since G_SEEK_END is not supported
	at the moment immediately return FALSE without aborting the
	the soup message.


Modified:
   trunk/ChangeLog
   trunk/daemon/soup-input-stream.c

Modified: trunk/daemon/soup-input-stream.c
==============================================================================
--- trunk/daemon/soup-input-stream.c	(original)
+++ trunk/daemon/soup-input-stream.c	Thu Mar  6 23:51:32 2008
@@ -842,6 +842,18 @@
   SoupInputStreamPrivate *priv = SOUP_INPUT_STREAM_GET_PRIVATE (seekable);
   char *range;
 
+  if (type == G_SEEK_END)
+    {
+      /* FIXME: we could send "bytes=-offset", but unless we know the
+       * Content-Length, we wouldn't be able to answer a tell() properly.
+       * We could find the Content-Length by doing a HEAD...
+       */
+
+      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                   "G_SEEK_END not currently supported");
+      return FALSE;
+    }
+
   if (!g_input_stream_set_pending (stream, error))
       return FALSE;
 
@@ -860,12 +872,8 @@
       break;
 
     case G_SEEK_END:
-      /* FIXME: we could send "bytes=-offset", but unless we know the
-       * Content-Length, we wouldn't be able to answer a tell() properly.
-       * We could find the Content-Length by doing a HEAD...
-       */
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		   "G_SEEK_END not currently supported");
+      range = NULL; /* keep compilers happy */
+      g_return_val_if_reached (FALSE);
       break;
 
     default:



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