GNOME Bugzilla – Bug 756916
[review] dcbw/bgo756916-wwan-connection-filters: add connection filters/restrictions for WWAN (sim-id, device-id, sim-operator-id)
Last modified: 2015-11-18 14:55:30 UTC
Please review.
> libnm/wwan: add GSM setting device-id, sim-id, and sim-operator-id properties +/** + * nm_setting_gsm_get_device_id: + * @setting: the #NMSettingGsm + * + * Returns: the #NMSettingGsm:device-id property of the setting + **/ Since: 1.2 +const char *nm_setting_gsm_get_device_id (NMSettingGsm *setting); +const char *nm_setting_gsm_get_sim_id (NMSettingGsm *setting); +const char *nm_setting_gsm_get_sim_operator_id (NMSettingGsm *setting); NM_AVAILABLE_IN_1_2 + nm_setting_gsm_get_device_id; + nm_setting_gsm_get_sim_id; + nm_setting_gsm_get_sim_operator_id; These should go in the libnm_1_2_0 section. > cli: add support for GSM setting device-id, sim-id, and sim-operator-id properties + if (strlen (val) != 5 && strlen (val) != 6) { + g_set_error_literal (error, 1, 0, _("SIM operator ID must be a 5 or 6 number MCCMNC code")); + return FALSE; + } + + while (p && *p) { + if (!isdigit (*p++)) { + g_set_error_literal (error, 1, 0, _("SIM operator ID must be a 5 or 6 number operator MCCMNC code")); Can we use the same message string for both errors? The rest looks good.
Fixed for comments; plus two patches that fix some issues I found in testing these out.
LGTM (pushed a indentation fixup).
pushed 3 minor fixups. Rest LGTM
Merged branch to master: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=dd2f09c8b166cc5f317a5298f01ea161c63895e6