diff options
author | Paul Wise <pabs3@bonedaddy.net> | 2014-11-02 08:22:47 +0800 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2014-11-02 10:28:02 +0100 |
commit | 08b6b2981b3fb35764c5ab46af27ad210cb96f37 (patch) | |
tree | 777f054404e1b0323f605d94a9c958faab22e058 | |
parent | 67fe181eb9f16c7914e74a5c769d2b94581f4d7c (diff) | |
download | external_libsamsung-ipc-08b6b2981b3fb35764c5ab46af27ad210cb96f37.zip external_libsamsung-ipc-08b6b2981b3fb35764c5ab46af27ad210cb96f37.tar.gz external_libsamsung-ipc-08b6b2981b3fb35764c5ab46af27ad210cb96f37.tar.bz2 |
Properly handle errors bootstrapping modem
-rw-r--r-- | tools/ipc-modem.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/ipc-modem.c b/tools/ipc-modem.c index 1509802..ad92113 100644 --- a/tools/ipc-modem.c +++ b/tools/ipc-modem.c @@ -431,7 +431,9 @@ int modem_start(struct ipc_client *client) int rc = -1; ipc_client_data_create(client); - ipc_client_boot(client); + rc = ipc_client_boot(client); + if(rc < 0) + return -1; usleep(300); @@ -536,7 +538,9 @@ int main(int argc, char *argv[]) printf("[E] Something went wrong while powering modem off\n"); goto modem_quit; } else if (strncmp(argv[optind], "boot", 9) == 0) { - ipc_client_boot(client_fmt); + rc = ipc_client_boot(client_fmt); + if (rc < 0) + printf("[E] Something went wrong while bootstrapping modem\n"); } else if(strncmp(argv[optind], "start", 5) == 0) { printf("[0] Starting modem on FMT client\n"); rc = modem_start(client_fmt); |