[tracker] Use host endian byte order for updates in steroids interface
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Use host endian byte order for updates in steroids interface
- Date: Wed, 20 Oct 2010 11:43:28 +0000 (UTC)
commit f6a203c0f82002d28f484b4e59692881c3eb5f37
Author: Jürg Billeter <j bitron ch>
Date: Wed Oct 20 13:25:27 2010 +0200
Use host endian byte order for updates in steroids interface
Queries in steroids interface already use host endian byte order. Let's
be consistent.
src/libtracker-bus/tracker-bus-fd-update.c | 2 ++
src/libtracker-client/tracker.c | 1 +
src/tracker-store/tracker-steroids.c | 2 ++
3 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-bus/tracker-bus-fd-update.c b/src/libtracker-bus/tracker-bus-fd-update.c
index 158e388..1ea0f38 100644
--- a/src/libtracker-bus/tracker-bus-fd-update.c
+++ b/src/libtracker-bus/tracker-bus-fd-update.c
@@ -347,6 +347,7 @@ sparql_update_fast_send (DBusConnection *connection,
buffered_output_stream = g_buffered_output_stream_new_sized (output_stream,
TRACKER_DBUS_PIPE_BUFFER_SIZE);
data_output_stream = g_data_output_stream_new (buffered_output_stream);
+ g_data_output_stream_set_byte_order (data_output_stream, G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN);
g_data_output_stream_put_int32 (data_output_stream, strlen (query),
NULL, &inner_error);
@@ -441,6 +442,7 @@ sparql_update_fast_send (DBusConnection *connection,
buffered_output_stream = g_buffered_output_stream_new_sized (output_stream,
TRACKER_DBUS_PIPE_BUFFER_SIZE);
data_output_stream = g_data_output_stream_new (buffered_output_stream);
+ g_data_output_stream_set_byte_order (data_output_stream, G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN);
g_data_output_stream_put_uint32 (data_output_stream,
queries_len,
diff --git a/src/libtracker-client/tracker.c b/src/libtracker-client/tracker.c
index f6d60f0..0d2632e 100644
--- a/src/libtracker-client/tracker.c
+++ b/src/libtracker-client/tracker.c
@@ -1106,6 +1106,7 @@ sparql_update_fast_send (TrackerClient *client,
buffered_output_stream = g_buffered_output_stream_new_sized (output_stream,
TRACKER_STEROIDS_BUFFER_SIZE);
data_output_stream = g_data_output_stream_new (buffered_output_stream);
+ g_data_output_stream_set_byte_order (data_output_stream, G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN);
g_data_output_stream_put_int32 (data_output_stream,
strlen (query),
diff --git a/src/tracker-store/tracker-steroids.c b/src/tracker-store/tracker-steroids.c
index 4b5e8d1..729ef87 100644
--- a/src/tracker-store/tracker-steroids.c
+++ b/src/tracker-store/tracker-steroids.c
@@ -648,6 +648,7 @@ steroids_update (TrackerSteroids *steroids,
data_input_stream = g_data_input_stream_new (input_stream);
g_buffered_input_stream_set_buffer_size (G_BUFFERED_INPUT_STREAM (data_input_stream),
TRACKER_STEROIDS_BUFFER_SIZE);
+ g_data_input_stream_set_byte_order (data_input_stream, G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN);
query_size = g_data_input_stream_read_int32 (data_input_stream,
NULL,
@@ -823,6 +824,7 @@ steroids_update_array (TrackerSteroids *steroids,
input_stream = g_unix_input_stream_new (info->fd, TRUE);
data_input_stream = g_data_input_stream_new (input_stream);
+ g_data_input_stream_set_byte_order (data_input_stream, G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN);
g_buffered_input_stream_set_buffer_size (G_BUFFERED_INPUT_STREAM (data_input_stream),
TRACKER_STEROIDS_BUFFER_SIZE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]