diff options
author | Thomas Haller <thaller@redhat.com> | 2015-09-08 21:39:40 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-09-09 11:52:33 +0200 |
commit | e7d66f1df61ebdc7652ba34a4e1baddcc86b9e26 (patch) | |
tree | d26720d8b844f15c7a796df5a68a27505ff59b75 /src/nm-config.c | |
parent | 8318672fe99773b0009cf68d291ce1f535309565 (diff) | |
download | NetworkManager-e7d66f1df61ebdc7652ba34a4e1baddcc86b9e26.tar.gz |
config: workaround invocation of "config-changed" signal
There seems to be a bug in glib/ffi that hits on s390x/ppc64 architecture.
It causes @changes in nm-dns-manager.c:config_changed_cb() to be NONE,
although it is clearly set (see the related bug rh #1260577 for glib).
Workaround this, by making the argument type a plain guint.
Note that the ill behavior is caught by test_config_signal() in
"src/tests/config/test-config.c".
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1062301
Diffstat (limited to 'src/nm-config.c')
-rw-r--r-- | src/nm-config.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/nm-config.c b/src/nm-config.c index 03f9788ecc..0ccb6e6af2 100644 --- a/src/nm-config.c +++ b/src/nm-config.c @@ -1890,7 +1890,17 @@ nm_config_class_init (NMConfigClass *config_class) G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, - G_TYPE_NONE, 3, NM_TYPE_CONFIG_DATA, NM_TYPE_CONFIG_CHANGE_FLAGS, NM_TYPE_CONFIG_DATA); + G_TYPE_NONE, + 3, + NM_TYPE_CONFIG_DATA, + /* Use plain guint type for changes argument. This avoids + * glib/ffi bug https://bugzilla.redhat.com/show_bug.cgi?id=1260577 */ + /* NM_TYPE_CONFIG_CHANGE_FLAGS, */ + G_TYPE_UINT, + NM_TYPE_CONFIG_DATA); + + G_STATIC_ASSERT_EXPR (sizeof (guint) == sizeof (NMConfigChangeFlags)); + G_STATIC_ASSERT_EXPR (((gint64) ((NMConfigChangeFlags) -1)) > ((gint64) 0)); } static void |