aboutsummaryrefslogtreecommitdiff
path: root/src/mm-serial-port.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-serial-port.c')
-rw-r--r--src/mm-serial-port.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c
index ac5d1d32..357fc947 100644
--- a/src/mm-serial-port.c
+++ b/src/mm-serial-port.c
@@ -620,6 +620,10 @@ data_available (GIOChannel *source,
err = NULL;
}
+ /* If no bytes read, just let g_io_channel wait for more data */
+ if (bytes_read == 0)
+ break;
+
if (bytes_read > 0) {
serial_debug (self, "<--", buf, bytes_read);
g_string_append_len (priv->response, buf, bytes_read);