NetworkManager/src/settings
Thomas Haller eec2740d71 all: use wrappers for g_ascii_strtoll(), g_ascii_strtoull(), g_ascii_strtod()
Sometimes these function may set errno to unexpected values like EAGAIN.
This causes confusion. Avoid that by using our own wrappers that retry
in that case. For example, in rhbz#1797915 we have failures like:

    errno = 0;
    v = g_ascii_strtoll ("10", 0, &end);
    if (errno != 0)
        g_assert_not_reached ();

as g_ascii_strtoll() would return 10, but also set errno to EAGAIN.

Work around that by using wrapper functions that retry. This certainly
should be fixed in glib (or glibc), but the issues are severe enough to
warrant a workaround.

Note that our workarounds are very defensive. We only retry 2 times, if
we get an unexpected errno value. This is in the hope to recover from
a spurious EAGAIN. It won't recover from other errors.

https://bugzilla.redhat.com/show_bug.cgi?id=1797915
(cherry picked from commit 7e49f4a199)
2020-04-02 07:45:39 +02:00
..
plugins all: use wrappers for g_ascii_strtoll(), g_ascii_strtoull(), g_ascii_strtod() 2020-04-02 07:45:39 +02:00
nm-agent-manager.c all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-agent-manager.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-secret-agent.c all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-secret-agent.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-settings-connection.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-settings-connection.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-settings-plugin.c all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-settings-plugin.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-settings-storage.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-settings-storage.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-settings-utils.c all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-settings-utils.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-settings.c settings: assert that we don't leak error variable in impl_settings_load_connections() 2019-12-09 09:55:16 +01:00
nm-settings.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00