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 790612 - [review] cleanup openvpn plugin and make user-name optional in the GUI [th/cleanup-bgo790612]
[review] cleanup openvpn plugin and make user-name optional in the GUI [th/cl...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-11-20 12:03 UTC by Thomas Haller
Modified: 2017-11-20 19:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2017-11-20 12:03:45 UTC
various cleanups.

A important fix is not to require the user-name in the GTK GUI.
 "properties: don't require username in GUI"
Comment 1 Beniamino Galvani 2017-11-20 16:08:22 UTC
> properties: don't use strlen() for checking for non-empty strings

I'm pretty sure the compiler generates the same code, but if it is for
readability, why not.


> properties: various cleanups in "properties/nm-openvpn-editor.c"

+       if (value && *value)
+               pw_flags = _nm_utils_ascii_str_to_int64 (value, 10, 0, 65535, 0);

I think the check on (value && *value) can be dropped as
_nm_utils_ascii_str_to_int64() already does it.


+       if (value && value[0])
+               direction = _nm_utils_ascii_str_to_int64 (value, 10, 0, 1, -1);

The same.

Otherwise looks good to me.
Comment 2 Thomas Haller 2017-11-20 19:18:54 UTC
fixed and merged to master: https://git.gnome.org/browse/network-manager-openvpn/commit/?id=f5b9b78284bce0c35d19144279569a58d6d0a9ec

Thanks