From 4cccab61ab70baf899a44da5d3d9c25d7e788485 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sat, 6 Oct 2012 17:08:53 -0500 Subject: [PATCH] supplicant: handle some D-Bus spawn errors better If D-Bus fails to spawn the supplicant it sometimes returns a method timeout error instead of a spawn error. We've seen that happen on F18 when systemd is used to autolaunch the supplicant. That causes NM to assume that the supplicant crashed and thus never try to talk to it again, on the assumption that (a) it crashed and (b) it will crash again if we try to use it, and thus we'll be in a spawn loop. First, (a) is not necessarily the case, and second, the supplicant doesn't crash like that anymore. So we're pretty safe to just talk to the supplicant if it starts later instead of ignoring it if we detect the timeout error. --- src/supplicant-manager/nm-supplicant-interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c index 39d5ad3bb7..45fe77afd6 100644 --- a/src/supplicant-manager/nm-supplicant-interface.c +++ b/src/supplicant-manager/nm-supplicant-interface.c @@ -907,6 +907,7 @@ interface_add_cb (DBusGProxy *proxy, || g_error_matches (error, DBUS_GERROR, DBUS_GERROR_SPAWN_EXEC_FAILED) || g_error_matches (error, DBUS_GERROR, DBUS_GERROR_SPAWN_FORK_FAILED) || g_error_matches (error, DBUS_GERROR, DBUS_GERROR_SPAWN_FAILED) + || g_error_matches (error, DBUS_GERROR, DBUS_GERROR_TIMEOUT) || dbus_g_error_has_name (error, DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND)) { /* Supplicant wasn't running and could be launched via service * activation. Wait for it to start by moving back to the INIT