This fixes error conversion to string in atcmd and adds error handling to shell.
Index: src/util/shell.c
===================================================================
--- src/util/shell.c	(revision 3976)
+++ src/util/shell.c	(working copy)
@@ -604,6 +604,8 @@
 				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.  */
Index: src/util/atcmd.c
===================================================================
--- src/util/atcmd.c	(revision 3976)
+++ src/util/atcmd.c	(working copy)
@@ -75,7 +75,7 @@
 			}
 			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

Reply via email to