aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Schrock <steve.schrock@getcruise.com>2024-04-16 22:12:31 +0000
committerDenis Kenzior <denkenz@gmail.com>2024-04-17 10:36:07 -0500
commit580a0c22e5cf757af21b3a66c66c5074766c3504 (patch)
tree3f940621db31b16d6518c0b5d99d00a70b3f28ea
parentb6ced6c5c4c94686ff85bb908bcdbc64b6719451 (diff)
downloadofono-580a0c22e5cf757af21b3a66c66c5074766c3504.tar.gz
gobi: Do not wait for timeout to shutdown
Now the qmi_device_shutdown() function can return a failure. It will do this if the qmi_device type does not support shutdown. When this happens gobi should immediately proceed with shutdown instead of waiting until the timeout occurs.
-rw-r--r--plugins/gobi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/gobi.c b/plugins/gobi.c
index 431df17e2..9ab561010 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -174,7 +174,8 @@ static void shutdown_device(struct ofono_modem *modem)
cleanup_services(data);
- qmi_device_shutdown(data->device, shutdown_cb, modem, NULL);
+ if (qmi_device_shutdown(data->device, shutdown_cb, modem, NULL) < 0)
+ shutdown_cb(modem);
}
static void power_reset_cb(struct qmi_result *result, void *user_data)