gvfs r2255 - in trunk: . daemon
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r2255 - in trunk: . daemon
- Date: Thu, 26 Feb 2009 19:59:56 +0000 (UTC)
Author: alexl
Date: Thu Feb 26 19:59:56 2009
New Revision: 2255
URL: http://svn.gnome.org/viewvc/gvfs?rev=2255&view=rev
Log:
2009-02-26 Alexander Larsson <alexl redhat com>
Bug 570977 â sftp backend sends trailing zeros to communication data
* daemon/gvfsbackendsftp.c (get_data_from_command_stream):
Use g_memory_output_stream_get_data_size instead of old
workaround.
Patch from Pekka Vuorela
Modified:
trunk/ChangeLog
trunk/daemon/gvfsbackendsftp.c
Modified: trunk/daemon/gvfsbackendsftp.c
==============================================================================
--- trunk/daemon/gvfsbackendsftp.c (original)
+++ trunk/daemon/gvfsbackendsftp.c Thu Feb 26 19:59:56 2009
@@ -459,16 +459,6 @@
return data_stream;
}
-static gsize
-get_data_size (GMemoryOutputStream *stream)
-{
- g_seekable_seek (G_SEEKABLE (stream),
- 0,
- G_SEEK_END,
- NULL, NULL);
- return g_seekable_tell (G_SEEKABLE (stream));
-}
-
static gpointer
get_data_from_command_stream (GDataOutputStream *command_stream, gsize *len)
{
@@ -477,8 +467,8 @@
guint32 *len_ptr;
mem_stream = g_filter_output_stream_get_base_stream (G_FILTER_OUTPUT_STREAM (command_stream));
+ *len = g_memory_output_stream_get_data_size (G_MEMORY_OUTPUT_STREAM (mem_stream));
data = g_memory_output_stream_get_data (G_MEMORY_OUTPUT_STREAM (mem_stream));
- *len = get_data_size (G_MEMORY_OUTPUT_STREAM (mem_stream));
len_ptr = (guint32 *)data;
*len_ptr = GUINT32_TO_BE (*len - 4);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]