diff options
author | Dan Williams <dcbw@redhat.com> | 2014-05-14 15:50:33 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2014-06-06 13:43:45 -0500 |
commit | 5150cb88c26d13e8c7c188f4f10614b6d318ad89 (patch) | |
tree | 7c66a15e09767aa288530b6b6ff5fd8b148d762f /callouts | |
parent | 4cc13befd3cc242c5065ce6ea91e335b705b2f36 (diff) |
dispatcher: only dispatch if scripts exist
If there are no dispatcher scripts, don't bother dispatching any
events. This saves some time configuring networking if the event
would have no effect anyway.
Diffstat (limited to 'callouts')
-rw-r--r-- | callouts/nm-dispatcher-api.h | 2 | ||||
-rw-r--r-- | callouts/nm-dispatcher.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/callouts/nm-dispatcher-api.h b/callouts/nm-dispatcher-api.h index 9fea487ada..96db789283 100644 --- a/callouts/nm-dispatcher-api.h +++ b/callouts/nm-dispatcher-api.h @@ -20,6 +20,8 @@ #include <dbus/dbus-glib.h> +#define NMD_SCRIPT_DIR NMCONFDIR "/dispatcher.d" + /* dbus-glib types for dispatcher call return value */ #define DISPATCHER_TYPE_RESULT (dbus_g_type_get_struct ("GValueArray", G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_INVALID)) #define DISPATCHER_TYPE_RESULT_ARRAY (dbus_g_type_get_collection ("GPtrArray", DISPATCHER_TYPE_RESULT)) diff --git a/callouts/nm-dispatcher.c b/callouts/nm-dispatcher.c index e9cd2e74e2..3747fd563a 100644 --- a/callouts/nm-dispatcher.c +++ b/callouts/nm-dispatcher.c @@ -41,8 +41,6 @@ #include "nm-dispatcher-utils.h" #include "nm-glib-compat.h" -#define NMD_SCRIPT_DIR NMCONFDIR "/dispatcher.d" - static GMainLoop *loop = NULL; static gboolean debug = FALSE; |