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
This fixes error conversion to string in atcmd and adds error handling
to shell.
- [patch] fix error handling in libgsmd-tool Paulius Zaleckas
- Re: [patch] fix error handling in libgsmd-tool Paulius Zaleckas
- Re: [patch] fix error handling in libgsmd-tool Sean Chiang