summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-10-27 20:47:03 +0100
committerThomas Haller <thaller@redhat.com>2014-10-27 20:48:45 +0100
commitd0535cafe504ef23a2da6af241900b7bda69386e (patch)
tree8bd2c4f8dfecce1d1c88375691f1e94b6560456b
parent6153e9e78d221482efbdb52ac68561d05846ba9c (diff)
parent3423e54c4e74b7a8c6b31450c5b5daadf6a2293f (diff)
downloadNetworkManager-d0535cafe504ef23a2da6af241900b7bda69386e.tar.gz
core: merge branch 'th/bgo738941_dbus_stop' (bgo #738941)
https://bugzilla.gnome.org/show_bug.cgi?id=738941 Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--src/devices/wifi/nm-device-wifi.c2
-rw-r--r--src/main.c4
-rw-r--r--src/settings/nm-settings.c6
-rw-r--r--src/supplicant-manager/nm-call-store.c8
4 files changed, 15 insertions, 5 deletions
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c
index 6617f4a69e..e3e927a5c7 100644
--- a/src/devices/wifi/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -246,7 +246,7 @@ supplicant_interface_acquire (NMDeviceWifi *self)
}
if (nm_supplicant_interface_get_state (priv->sup_iface) < NM_SUPPLICANT_INTERFACE_STATE_READY)
- nm_device_add_pending_action (NM_DEVICE (self), "waiting for supplicant", TRUE);
+ nm_device_add_pending_action (NM_DEVICE (self), "waiting for supplicant", FALSE);
g_signal_connect (priv->sup_iface,
NM_SUPPLICANT_INTERFACE_STATE,
diff --git a/src/main.c b/src/main.c
index 17769587a9..f4f693d1e4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -99,6 +99,9 @@ signal_handling_thread (void *arg)
/* Reread config stuff like system config files, VPN service files, etc */
nm_log_info (LOGD_CORE, "caught signal %d, not supported yet.", signo);
break;
+ case SIGPIPE:
+ /* silently ignore signal */
+ break;
default:
nm_log_err (LOGD_CORE, "caught unexpected signal %d", signo);
break;
@@ -124,6 +127,7 @@ setup_signals (void)
sigaddset (&signal_set, SIGHUP);
sigaddset (&signal_set, SIGINT);
sigaddset (&signal_set, SIGTERM);
+ sigaddset (&signal_set, SIGPIPE);
/* Block all signals of interest. */
status = pthread_sigmask (SIG_BLOCK, &signal_set, &old_sig_mask);
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c
index 1bf2734457..e9d3eaf24d 100644
--- a/src/settings/nm-settings.c
+++ b/src/settings/nm-settings.c
@@ -650,7 +650,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error)
plugin = g_module_open (path, G_MODULE_BIND_LOCAL);
if (!plugin) {
- g_set_error (error, NM_SETTINGS_ERROR, 0,
+ g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED,
"Could not load plugin '%s': %s",
pname, g_module_error ());
g_free (full_name);
@@ -663,7 +663,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error)
g_free (path);
if (!g_module_symbol (plugin, "nm_system_config_factory", (gpointer) (&factory_func))) {
- g_set_error (error, NM_SETTINGS_ERROR, 0,
+ g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED,
"Could not find plugin '%s' factory function.",
pname);
success = FALSE;
@@ -672,7 +672,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error)
obj = (*factory_func) ();
if (!obj || !NM_IS_SYSTEM_CONFIG_INTERFACE (obj)) {
- g_set_error (error, NM_SETTINGS_ERROR, 0,
+ g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED,
"Plugin '%s' returned invalid system config object.",
pname);
success = FALSE;
diff --git a/src/supplicant-manager/nm-call-store.c b/src/supplicant-manager/nm-call-store.c
index 4b427549d5..950d199e3a 100644
--- a/src/supplicant-manager/nm-call-store.c
+++ b/src/supplicant-manager/nm-call-store.c
@@ -44,7 +44,13 @@ nm_call_store_add (NMCallStore *store,
g_return_if_fail (store != NULL);
g_return_if_fail (proxy != NULL);
- g_return_if_fail (call != NULL);
+
+ if (!call) {
+ /* Allow calling nm_call_store_add() with NULL @call for convenience.
+ * This way you can pass the result of dbus_g_proxy_begin_call() directly
+ * to nm_call_store_add() without checking for NULL. */
+ return;
+ }
calls = g_hash_table_lookup (store, proxy);
if (!calls) {