diff options
author | Tambet Ingo <tambet@gmail.com> | 2008-09-11 15:12:07 +0300 |
---|---|---|
committer | Tambet Ingo <tambet@gmail.com> | 2008-09-11 15:12:07 +0300 |
commit | 37b716de8aa06833c1bea1066111f6268e08d440 (patch) | |
tree | 9b9c70a0e85b7664e952dbd57c060227855c96ab /src/mm-serial.c | |
parent | 29387c24b08f4fb3d9d265a3f054ca78a90be54f (diff) |
Fix error codes.
Diffstat (limited to 'src/mm-serial.c')
-rw-r--r-- | src/mm-serial.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mm-serial.c b/src/mm-serial.c index 415a3e2d..621f6bcc 100644 --- a/src/mm-serial.c +++ b/src/mm-serial.c @@ -376,9 +376,9 @@ mm_serial_timed_out (gpointer data) priv->timeout_id = 0; - error = g_error_new (MM_SERIAL_ERROR, - MM_SERIAL_RESPONSE_TIMEOUT, - "%s", "Serial command timed out"); + error = g_error_new_literal (MM_SERIAL_ERROR, + MM_SERIAL_RESPONSE_TIMEOUT, + "Serial command timed out"); /* FIXME: This is not completely correct - if the response finally arrives and there's some other command waiting for response right now, the other command will get the output of the timed out command. Maybe flashing would help here? */ @@ -480,6 +480,8 @@ data_available (GIOChannel *source, if (parse_response (self, priv->response, &err)) mm_serial_got_response (self, err); + /* FIXME: Make sure the string doesn't grow too long */ + } while (bytes_read == SERIAL_BUF_SIZE || status == G_IO_STATUS_AGAIN); return TRUE; |