[gvfs] http: Fix segfault when seeking on read
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] http: Fix segfault when seeking on read
- Date: Sun, 8 Dec 2013 11:16:08 +0000 (UTC)
commit 0ea226568dec4ff8738c835e68dce3c98501cefb
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Sun Dec 8 12:44:06 2013 +0200
http: Fix segfault when seeking on read
Previously, the dav backend would segfault when reading after a seek (or
also if you did a read_async() without an explicit send()/send_async()
first) because the stream from soup_request_send_finish() was not being
stored, so store it.
https://bugzilla.gnome.org/show_bug.cgi?id=710534
daemon/gvfshttpinputstream.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfshttpinputstream.c b/daemon/gvfshttpinputstream.c
index 85c997a..5cee957 100644
--- a/daemon/gvfshttpinputstream.c
+++ b/daemon/gvfshttpinputstream.c
@@ -328,7 +328,8 @@ read_send_callback (GObject *object,
ReadAfterSendData *rasd = g_task_get_task_data (task);
GError *error = NULL;
- if (!soup_request_send_finish (SOUP_REQUEST (object), result, &error))
+ priv->stream = soup_request_send_finish (SOUP_REQUEST (object), result, &error);
+ if (!priv->stream)
{
g_task_return_error (task, error);
g_object_unref (task);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]