diff options
Diffstat (limited to 'src/gsmd')
-rw-r--r-- | src/gsmd/atcmd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c index faa91f3..3d4fe4b 100644 --- a/src/gsmd/atcmd.c +++ b/src/gsmd/atcmd.c @@ -492,9 +492,10 @@ static int atcmd_select_cb(int fd, unsigned int what, void *data) if (len < 0) { if (errno == EAGAIN) return 0; - gsmd_log(GSMD_NOTICE, "ERROR reading from fd %u: %d (%s)\n", fd, len, + gsmd_log(GSMD_FATAL, "ERROR reading from fd %u: %d (%s)\n", fd, len, strerror(errno)); return len; + exit(3); } rc = llparse_string(&g->llp, rxbuf, len); if (rc < 0) { @@ -518,8 +519,9 @@ static int atcmd_select_cb(int fd, unsigned int what, void *data) gsmd_log(GSMD_ERROR, "write returns 0, aborting\n"); break; } else if (rc < 0) { - gsmd_log(GSMD_ERROR, "error during write to fd %d: %d\n", + gsmd_log(GSMD_FATAL, "error during write to fd %d: %d\n", fd, rc); + exit(3); return rc; } if (!cr || rc == len) |