aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-04-03 00:31:02 +0200
committerAleksander Morgado <aleksander@aleksander.es>2018-04-03 15:58:49 +0200
commit7e94928301a971488ea53b17dd7d5ef37f468b1d (patch)
tree82fe384ad6d7404d08ec13dd8d6b9286f954c623
parentc9dee2b960d6176c1d5462c5db8cd55925eafc44 (diff)
ublox: fix 'any' mode building
The 'any' mode refers to the mode which includes most access technologies and where none of them is preferred. Fix the logic so that all combinations with one technology preferred over the others are ignored, instead of the other way around. Fixes assertion with the 4G-only LARA R204. ModemManager[424]: <debug> [-192499452.090358] (ttyACM0): --> 'AT+URAT=?<CR>' ModemManager[424]: <debug> [-192499452.092150] (ttyACM0): <-- '<CR><LF>+URAT: (3)<CR><LF><CR><LF>OK<CR><LF>' ** ERROR:ublox/mm-modem-helpers-ublox.c:817:mm_ublox_get_modem_mode_any: assertion failed: (any != MM_MODEM_MODE_NONE) Reported-by: Matthew Starr <mstarr@hedonline.com>
-rw-r--r--plugins/ublox/mm-modem-helpers-ublox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/ublox/mm-modem-helpers-ublox.c b/plugins/ublox/mm-modem-helpers-ublox.c
index b0b4bf3e..ff1a8488 100644
--- a/plugins/ublox/mm-modem-helpers-ublox.c
+++ b/plugins/ublox/mm-modem-helpers-ublox.c
@@ -802,7 +802,7 @@ mm_ublox_get_modem_mode_any (const GArray *combinations)
guint bits_set;
combination = &g_array_index (combinations, MMModemModeCombination, i);
- if (combination->preferred == MM_MODEM_MODE_NONE)
+ if (combination->preferred != MM_MODEM_MODE_NONE)
continue;
bits_set = mm_count_bits_set (combination->allowed);
if (bits_set > any_bits_set) {