Browse Source

devicechannel: consume the last \n character

A message ends with \n (newline), make sure that's the only extra
character we consume.
bboozzoo/socket-source
Maciek Borzecki 9 years ago
parent
commit
ba16d18379
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      src/mconnect/devicechannel.vala

+ 1
- 2
src/mconnect/devicechannel.vala View File

@ -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);


Loading…
Cancel
Save