summaryrefslogtreecommitdiff
path: root/client/gdaemonfileinputstream.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-03-06 15:20:19 +0000
committerAlexander Larsson <alexl@src.gnome.org>2009-03-06 15:20:19 +0000
commitedaff5e021cbe7b928ca2652cb57d8361923cb7c (patch)
tree032e6c7e5fdc7aed31b49c8a014325699c4be2b7 /client/gdaemonfileinputstream.c
parent9172ffc94ddc0771a5bb805f0d6608b431f8e04f (diff)
downloadgvfs-edaff5e021cbe7b928ca2652cb57d8361923cb7c.tar.gz
Don't send cancel when partial header read, as that would throw away the
2009-03-06 Alexander Larsson <alexl@redhat.com> * client/gdaemonfileinputstream.c: (iterate_read_state_machine): (iterate_close_state_machine): (iterate_seek_state_machine): (iterate_query_state_machine): Don't send cancel when partial header read, as that would throw away the part of the headers read so far. svn path=/trunk/; revision=2295
Diffstat (limited to 'client/gdaemonfileinputstream.c')
-rw-r--r--client/gdaemonfileinputstream.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/client/gdaemonfileinputstream.c b/client/gdaemonfileinputstream.c
index db7c3abf..69f70c62 100644
--- a/client/gdaemonfileinputstream.c
+++ b/client/gdaemonfileinputstream.c
@@ -735,7 +735,7 @@ iterate_read_state_machine (GDaemonFileInputStream *file, IOOperationData *io_op
current_len + len);
io_op->io_buffer = file->input_buffer->str + current_len;
io_op->io_size = len;
- io_op->io_allow_cancel = !op->sent_cancel;
+ io_op->io_allow_cancel = file->input_buffer->len == 0 && !op->sent_cancel;
return STATE_OP_READ;
}
@@ -993,7 +993,7 @@ iterate_close_state_machine (GDaemonFileInputStream *file, IOOperationData *io_o
current_len + len);
io_op->io_buffer = file->input_buffer->str + current_len;
io_op->io_size = len;
- io_op->io_allow_cancel = !op->sent_cancel;
+ io_op->io_allow_cancel = file->input_buffer->len == 0 && !op->sent_cancel;
return STATE_OP_READ;
}
@@ -1257,7 +1257,7 @@ iterate_seek_state_machine (GDaemonFileInputStream *file, IOOperationData *io_op
current_len + len);
io_op->io_buffer = file->input_buffer->str + current_len;
io_op->io_size = len;
- io_op->io_allow_cancel = !op->sent_cancel;
+ io_op->io_allow_cancel = file->input_buffer->len == 0 && !op->sent_cancel;
return STATE_OP_READ;
}
@@ -1534,7 +1534,7 @@ iterate_query_state_machine (GDaemonFileInputStream *file,
current_len + len);
io_op->io_buffer = file->input_buffer->str + current_len;
io_op->io_size = len;
- io_op->io_allow_cancel = !op->sent_cancel;
+ io_op->io_allow_cancel = file->input_buffer->len == 0 && !op->sent_cancel;
return STATE_OP_READ;
}