From bb827c3ef7a57caa295eed92438e713f6f841dae Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 28 Apr 2011 12:46:24 +0200 Subject: [PATCH] samsung: allow setting a single band only --- plugins/mm-modem-samsung-gsm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 {