diff options
author | erin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2008-02-08 18:02:15 +0000 |
---|---|---|
committer | erin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2008-02-08 18:02:15 +0000 |
commit | fb0265f553ca0efe8aac0f10de480bffeff1a33d (patch) | |
tree | 93f844f35e8fabd4d3d753827fd0334cae6de2e0 | |
parent | c610fc85e4421b3dd5ce5debe60efff910ca07ec (diff) |
gsmd: fix error handling in libgsmd-tool (Paulius Zaleckas)
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4030 99fdad57-331a-0410-800a-d7fa5415bdb3
-rw-r--r-- | src/util/atcmd.c | 2 | ||||
-rw-r--r-- | src/util/shell.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/util/atcmd.c b/src/util/atcmd.c index 88703d0..c84c3ec 100644 --- a/src/util/atcmd.c +++ b/src/util/atcmd.c @@ -75,7 +75,7 @@ int atcmd_main(struct lgsm_handle *lgsmh) } rc = lgsm_handle_packet(lgsmh, buf, rc); if (rc < 0) - printf("ERROR processing packet: %d(%s)\n", rc, strerror(rc)); + printf("ERROR processing packet: %d(%s)\n", rc, strerror(-rc)); } if (FD_ISSET(0, &readset)) { /* we've received something on stdin. send it as passthrough diff --git a/src/util/shell.c b/src/util/shell.c index ae92611..b7d65f5 100644 --- a/src/util/shell.c +++ b/src/util/shell.c @@ -605,6 +605,8 @@ int shell_main(struct lgsm_handle *lgsmh, int sync) break; } rc = lgsm_handle_packet(lgsmh, buf, rc); + if (rc < 0) + printf("ERROR processing packet: %d(%s)\n", rc, strerror(-rc)); } if (FD_ISSET(0, &readset)) { /* we've received something on stdin. */ |