After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756916 - [review] dcbw/bgo756916-wwan-connection-filters: add connection filters/restrictions for WWAN (sim-id, device-id, sim-operator-id)
[review] dcbw/bgo756916-wwan-connection-filters: add connection filters/restr...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: Mobile broadband
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-10-21 16:03 UTC by Dan Williams
Modified: 2015-11-18 14:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Williams 2015-10-21 16:03:23 UTC
Please review.
Comment 1 Beniamino Galvani 2015-10-22 13:04:02 UTC
> 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.
Comment 2 Dan Williams 2015-10-22 18:56:41 UTC
Fixed for comments; plus two patches that fix some issues I found in testing these out.
Comment 3 Beniamino Galvani 2015-11-12 11:22:01 UTC
LGTM (pushed a indentation fixup).
Comment 4 Thomas Haller 2015-11-13 15:37:44 UTC
pushed 3 minor fixups.

Rest LGTM