From: short <> Date: Tue, 2 Sep 2003 22:10:29 +0000 (+0000) Subject: Fixed do_read() 'offset' corruption. X-Git-Tag: gnome_vfs_httpcaptive_2_3_8captive1~8 X-Git-Url: https://git.jankratochvil.net/?a=commitdiff_plain;h=bc1854eb79d7102b12fbb030d19ea71451d69682;p=gnome-vfs-httpcaptive.git Fixed do_read() 'offset' corruption. --- diff --git a/modules/http-method.c b/modules/http-method.c index 5d4ee1e..cc40202 100644 --- a/modules/http-method.c +++ b/modules/http-method.c @@ -1917,7 +1917,9 @@ GnomeVFSResult result; if (handle->offset != handle->socket_buffer_offset) { GnomeVFSURI *uri = handle->uri; gchar *extra_headers; + GnomeVFSFileOffset offset_save; + offset_save = handle->offset; gnome_vfs_uri_ref(uri); http_handle_close (handle, context); extra_headers = g_strdup_printf("Range: bytes=%" G_GINT64_FORMAT "-\r\n",(gint64)handle->offset); @@ -1925,6 +1927,7 @@ GnomeVFSResult result; context); g_free (extra_headers); gnome_vfs_uri_unref(uri); + handle->offset = offset_save; if (result != GNOME_VFS_OK) { /* FIXME: 'method_handle' is now broken! */ memset(handle, 0, sizeof (*handle));