aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-11-26 17:05:52 -0600
committerDan Williams <dcbw@redhat.com>2012-11-27 09:56:25 -0600
commit8772d63389b97a65bcace9fe0b54175a6adab9fe (patch)
treec00e9dc98fb1b9b9048240dad641714710e31ab3 /src/mm-plugin.c
parenta7167b93b9f077e063024754ad2d566fc65f76b4 (diff)
serial-port: stop reading data if the serial port was closed
If a response processor closed the port, don't try to read any more data from it. Move the priv->watch_id check to the while condition so the loop terminates before calling g_io_channel_read_chars() again, which caused a warning since the underlying file descriptor was already closed. Also, bytes_read will never be less than zero (it's unsigned), so skip the bytes_read > 0 check and just assert that this condition is true.
Diffstat (limited to 'src/mm-plugin.c')
0 files changed, 0 insertions, 0 deletions