x22x: Fix problem in set allowed mode

NM attempts to set allowed and preferred mode during the connection
process. The plugin x220x does not handle properly when NM request
allowed mode to '2g, 3g' and the preferred mode to 'none'.

This commit attempts to solve the problem described above. When this
situation happens, establish the mode of the modem has 'ANY' (which
seems the safest one) instead of just throwing an error.

Signed-off-by: David Castellanos <dcastellanos@indra.es>
This commit is contained in:
David Castellanos
2013-04-01 16:03:39 +02:00
committed by Aleksander Morgado
parent c9b7761ed5
commit 2896e711ae
+2
View File
@@ -160,6 +160,8 @@ set_allowed_modes (MMIfaceModem *self,
else if (allowed == MM_MODEM_MODE_ANY &&
preferred == MM_MODEM_MODE_NONE)
syssel = 0;
else if (allowed == (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G))
syssel = 0;
else {
gchar *allowed_str;
gchar *preferred_str;