From ba16d18379784797bcc2281ccef3571af41d764e Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Sat, 2 Jul 2016 23:00:26 +0200 Subject: [PATCH] devicechannel: consume the last \n character A message ends with \n (newline), make sure that's the only extra character we consume. --- src/mconnect/devicechannel.vala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mconnect/devicechannel.vala b/src/mconnect/devicechannel.vala index 5d4a56a..784ddb8 100644 --- a/src/mconnect/devicechannel.vala +++ b/src/mconnect/devicechannel.vala @@ -180,8 +180,7 @@ class DeviceChannel : Object { try { data = _din.read_upto("\n", -1, out line_len, null); - // expecting \n\n - _din.read_byte(); + // expecting \n _din.read_byte(); } catch (IOError ie) { debug("I/O error: %s", ie.message);