diff options
author | Denis Kenzior <denkenz@gmail.com> | 2024-02-22 14:09:32 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2024-02-22 14:09:32 -0600 |
commit | b95a03190891bb206e863d6034edf2529da0f9f3 (patch) | |
tree | 40504b9041725a6b6b923749b975177594376236 | |
parent | 365293bf04514959b258fef37e34a5c0200788b1 (diff) | |
download | ofono-b95a03190891bb206e863d6034edf2529da0f9f3.tar.gz |
gobi: Fail early if re-tried discovery fails
-rw-r--r-- | plugins/gobi.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/gobi.c b/plugins/gobi.c index c4e63b7b4..99a7d5564 100644 --- a/plugins/gobi.c +++ b/plugins/gobi.c @@ -406,11 +406,10 @@ static void discover_cb(void *user_data) data->features |= GOBI_VOICE; if (!(data->features & GOBI_DMS)) { - if (++data->discover_attempts < 3) { - qmi_device_discover(data->device, discover_cb, - modem, NULL); + if (++data->discover_attempts < 3 && + !qmi_device_discover(data->device, discover_cb, + modem, NULL)) return; - } shutdown_device(modem); return; |