From d3ad52d64972c96eec7b1cbcbd17b1bbada946f2 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 15 Jul 2004 14:49:04 +0000 Subject: [PATCH] 2004-07-15 Dan Williams * dispatcher-daemon/Makefile.am - Turn on warnings * dispatcher-daemon/NetworkManagerDispatcher.c - Remove unused variables due to warnings - Fix some comments - Print message on receipt of NeedKeyForNetwork signal (testing only) git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@14 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 10 ++++++++++ dispatcher-daemon/Makefile.am | 9 +++++---- dispatcher-daemon/Makefile.in | 9 ++++++--- dispatcher-daemon/NetworkManagerDispatcher.c | 10 +++++----- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index e4a0545c5d..e0d5499b51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-07-15 Dan Williams + + * dispatcher-daemon/Makefile.am + - Turn on warnings + + * dispatcher-daemon/NetworkManagerDispatcher.c + - Remove unused variables due to warnings + - Fix some comments + - Print message on receipt of NeedKeyForNetwork signal (testing only) + 2004-07-06 Dan Williams * src/NetworkManager.c diff --git a/dispatcher-daemon/Makefile.am b/dispatcher-daemon/Makefile.am index 75985f3a8a..b5be55ba01 100644 --- a/dispatcher-daemon/Makefile.am +++ b/dispatcher-daemon/Makefile.am @@ -1,7 +1,8 @@ -INCLUDES = \ - $(NM_CFLAGS) \ - -DDBUS_API_SUBJECT_TO_CHANGE \ - -DBINDIR=\"$(bindir)\" \ +INCLUDES = \ + $(NM_CFLAGS) \ + -Wall \ + -DDBUS_API_SUBJECT_TO_CHANGE \ + -DBINDIR=\"$(bindir)\" \ -DDATADIR=\"$(datadir)\" bin_PROGRAMS = NetworkManagerDispatcher diff --git a/dispatcher-daemon/Makefile.in b/dispatcher-daemon/Makefile.in index 030dafa0cd..72ae2f9d63 100644 --- a/dispatcher-daemon/Makefile.in +++ b/dispatcher-daemon/Makefile.in @@ -56,6 +56,8 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GLADE_CFLAGS = @GLADE_CFLAGS@ +GLADE_LIBS = @GLADE_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -108,9 +110,10 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = \ - $(NM_CFLAGS) \ - -DDBUS_API_SUBJECT_TO_CHANGE \ - -DBINDIR=\"$(bindir)\" \ + $(NM_CFLAGS) \ + -Wall \ + -DDBUS_API_SUBJECT_TO_CHANGE \ + -DBINDIR=\"$(bindir)\" \ -DDATADIR=\"$(datadir)\" diff --git a/dispatcher-daemon/NetworkManagerDispatcher.c b/dispatcher-daemon/NetworkManagerDispatcher.c index c18e61a109..11745159e7 100644 --- a/dispatcher-daemon/NetworkManagerDispatcher.c +++ b/dispatcher-daemon/NetworkManagerDispatcher.c @@ -30,7 +30,7 @@ #include #include #include - +#include enum NMDAction { @@ -228,6 +228,8 @@ static DBusHandlerResult nmd_dbus_filter (DBusConnection *connection, DBusMessag action = NMD_DEVICE_NOW_INACTIVE; else if (dbus_message_is_signal (message, "org.freedesktop.NetworkManager", "DeviceNowActive")) action = NMD_DEVICE_NOW_ACTIVE; + else if (dbus_message_is_signal (message, "org.freedesktop.NetworkManager", "NeedKeyForNetwork")) + fprintf (stderr, "NeedKeyForNetwork\n"); if (action != NMD_DEVICE_DONT_KNOW) { @@ -271,7 +273,7 @@ static DBusConnection *nmd_dbus_init (void) DBusConnection *connection = NULL; DBusError error; - /* connect to hald service on the system bus */ + /* connect to NetworkManager service on the system bus */ dbus_error_init (&error); connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error); if (connection == NULL) @@ -377,7 +379,6 @@ int main( int argc, char *argv[] ) if (become_daemon) { int child_pid; - int dev_null_fd; if (chdir ("/") < 0) { @@ -406,11 +407,10 @@ int main( int argc, char *argv[] ) if (!g_thread_supported ()) g_thread_init (NULL); - /* Create our dbus service */ + /* Connect to the NetworkManager dbus service and run the main loop */ connection = nmd_dbus_init (); if (connection) { - /* Run the main loop, all events processed by callbacks from libhal. */ loop = g_main_loop_new (NULL, FALSE); g_main_loop_run (loop); }