aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-04-28 12:46:24 +0200
committerAleksander Morgado <aleksander@lanedo.com>2011-04-29 12:31:11 +0200
commitbb827c3ef7a57caa295eed92438e713f6f841dae (patch)
tree6ffd960668de456563bdb103dfc0989dd7866f96
parentdb7c11768a968913c783c05c27e06bcf249502c0 (diff)
samsung: allow setting a single band only
-rwxr-xr-xplugins/mm-modem-samsung-gsm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mm-modem-samsung-gsm.c b/plugins/mm-modem-samsung-gsm.c
index ca4dceaf..ff57274a 100755
--- a/plugins/mm-modem-samsung-gsm.c
+++ b/plugins/mm-modem-samsung-gsm.c
@@ -31,6 +31,7 @@
#include "mm-modem-gsm-card.h"
#include "mm-log.h"
#include "mm-modem-icera.h"
+#include "mm-utils.h"
static void modem_init (MMModem *modem_class);
static void modem_gsm_network_init (MMModemGsmNetwork *gsm_network_class);
@@ -168,7 +169,11 @@ set_band (MMModemGsmNetwork *modem,
return;
}
- if (!band_mm_to_samsung (band, modem)) {
+ /* TODO: Check how to pass more than one band in the same AT%%IPBM command */
+ if (!utils_check_for_single_value (band)) {
+ info->error = g_error_new_literal (MM_MODEM_ERROR, MM_MODEM_ERROR_GENERAL, "Cannot set more than one band.");
+ mm_callback_info_schedule (info);
+ } else if (!band_mm_to_samsung (band, modem)) {
info->error = g_error_new_literal (MM_MODEM_ERROR, MM_MODEM_ERROR_GENERAL, "Invalid band.");
mm_callback_info_schedule (info);
} else {