summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-04-03 14:43:50 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-04-03 16:22:05 +0200
commite17cd19f2341eeafa666301580fed1f0a77c83a6 (patch)
tree29b16e6cd025707ffa1fb57bb758912d89187fff
parentb985cb3474132a802df647e0438a2872c02c71fa (diff)
downloadtelepathy-glib-e17cd19f2341eeafa666301580fed1f0a77c83a6.tar.gz
stream tube examples: send \n with data
This will allow us to use g_data_input_stream_read_line_utf8() in Python as g_input_stream_read() is not bindable.
-rw-r--r--examples/client/stream-tubes/accepter.c2
-rw-r--r--examples/client/stream-tubes/offerer.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/client/stream-tubes/accepter.c b/examples/client/stream-tubes/accepter.c
index 1d9966b1c..41d7652bc 100644
--- a/examples/client/stream-tubes/accepter.c
+++ b/examples/client/stream-tubes/accepter.c
@@ -49,7 +49,7 @@ _tube_accepted (GObject *tube,
/* this bit is not a good example */
g_debug ("Sending: Ping");
- g_output_stream_write (out, "Ping", 4, NULL, &error);
+ g_output_stream_write (out, "Ping\n", 5, NULL, &error);
g_assert_no_error (error);
g_input_stream_read (in, &buf, sizeof (buf), NULL, &error);
diff --git a/examples/client/stream-tubes/offerer.c b/examples/client/stream-tubes/offerer.c
index d33ba7c91..3ba010623 100644
--- a/examples/client/stream-tubes/offerer.c
+++ b/examples/client/stream-tubes/offerer.c
@@ -59,7 +59,7 @@ _incoming_iostream (TpStreamTubeChannel *tube,
g_debug ("Received: %s", buf);
g_debug ("Sending: Pong");
- g_output_stream_write (out, "Pong", 4, NULL, &error);
+ g_output_stream_write (out, "Pong\n", 5, NULL, &error);
g_assert_no_error (error);
tp_channel_close_async (TP_CHANNEL (tube), channel_closed_cb, NULL);