summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util/atcmd.c2
-rw-r--r--src/util/shell.c2
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. */
personal git repositories of Harald Welte. Your mileage may vary