Merge branch 'dbus-1.4'
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 5 Aug 2011 13:52:37 +0000 (14:52 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 5 Aug 2011 13:52:37 +0000 (14:52 +0100)
Conflicts:
bus/main.c

1  2 
bus/main.c
test/Makefile.am

diff --cc bus/main.c
index 594e3fb6708ee7738427160e0d98b20b24782310,47f38c8cba4d0143195bcbfad5ee64f395b47841..e879ff86deac64e98b3240d6cca3de4ea572a8f7
@@@ -46,9 -46,15 +46,15 @@@ static int reload_pipe[2]
  #define RELOAD_READ_END 0
  #define RELOAD_WRITE_END 1
  
 -static void close_reload_pipe (void);
 +static void close_reload_pipe (DBusWatch **);
  
 -#ifdef DBUS_UNIX
 +#ifdef DBUS_UNIX
+ typedef enum
+  {
+    ACTION_RELOAD = 'r',
+    ACTION_QUIT = 'q'
+  } SignalAction;
  static void
  signal_handler (int sig)
  {
@@@ -198,9 -229,15 +229,15 @@@ handle_reload_watch (DBusWatch    *watc
        _dbus_read_socket (reload_pipe[RELOAD_READ_END], &str, 1) != 1)
      {
        _dbus_warn ("Couldn't read from reload pipe.\n");
 -      close_reload_pipe ();
 +      close_reload_pipe (&watch);
        return TRUE;
      }
+   action_str = _dbus_string_get_data (&str);
+   if (action_str != NULL)
+     {
+       action = action_str[0];
+     }
    _dbus_string_free (&str);
  
    /* this can only fail if we don't understand the config file
index 7adb8233b9b70a5f4062d1511bd8c1d637ba5ec7,e5fd756bcfe28605d9b685103c1d34f0a88dc1b6..971299a909b6c76c28bf480eb6767df1c2f1a894
@@@ -65,24 -52,55 +65,28 @@@ endif !DBUS_BUILD_TEST
  
  noinst_PROGRAMS= $(TEST_BINARIES)
  
 -test_service_SOURCES=                         \
 -      test-service.c
 -
 -test_names_SOURCES=                           \
 -      test-names.c
 -
 -##break_loader_SOURCES=                               \
 -##    break-loader.c
 -
 -test_shell_service_SOURCES =                  \
 -      test-shell-service.c
 -
 -shell_test_SOURCES=                             \
 -        shell-test.c
 -
 -spawn_test_SOURCES=                           \
 -      spawn-test.c
 -
 -test_exit_SOURCES =                           \
 -      test-exit.c
 -
 -test_segfault_SOURCES =                               \
 -      test-segfault.c
 -
 -test_sleep_forever_SOURCES =                  \
 -      test-sleep-forever.c
 -
 -# This assumes that most tests will be linked to libdbus-internal;
 -# tests linked to only the public libdbus have their own CPPFLAGS.
 -AM_CPPFLAGS=-DDBUS_STATIC_BUILD
 -TEST_LIBS=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS)
 +static_cppflags = \
 +      $(AM_CPPFLAGS) \
 +      -DDBUS_STATIC_BUILD \
 +      $(NULL)
  
 -test_service_LDADD=libdbus-testutils.la $(TEST_LIBS)
 -test_service_LDFLAGS=@R_DYNAMIC_LDFLAG@
 -test_names_LDADD=libdbus-testutils.la $(TEST_LIBS)
 -test_names_LDFLAGS=@R_DYNAMIC_LDFLAG@
 -## break_loader_LDADD= $(TEST_LIBS)
 -## break_loader_LDFLAGS=@R_DYNAMIC_LDFLAG@
 -test_shell_service_LDADD=libdbus-testutils.la $(TEST_LIBS)
 -test_shell_service_LDFLAGS=@R_DYNAMIC_LDFLAG@
 -shell_test_LDADD=libdbus-testutils.la $(TEST_LIBS)
 -shell_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
 -spawn_test_LDADD=$(TEST_LIBS)
 -spawn_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
 +test_service_CPPFLAGS = $(static_cppflags)
 +test_service_LDADD = libdbus-testutils.la
 +test_names_CPPFLAGS = $(static_cppflags)
 +test_names_LDADD = libdbus-testutils.la
 +## break_loader_CPPFLAGS = $(static_cppflags)
 +## break_loader_LDADD = $(top_builddir)/dbus/libdbus-internal.la
 +test_shell_service_CPPFLAGS = $(static_cppflags)
 +test_shell_service_LDADD = libdbus-testutils.la
 +shell_test_CPPFLAGS = $(static_cppflags)
 +shell_test_LDADD = libdbus-testutils.la
 +spawn_test_CPPFLAGS = $(static_cppflags)
 +spawn_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la
  
 -test_refs_CPPFLAGS = -DDBUS_STATIC_BUILD $(GLIB_CFLAGS)
 -test_refs_LDADD = libdbus-testutils.la $(GLIB_LIBS) $(TEST_LIBS)
+ test_refs_SOURCES = internals/refs.c
++test_refs_CPPFLAGS = $(static_cppflags)
++test_refs_LDADD = libdbus-testutils.la $(GLIB_LIBS)
  EXTRA_DIST = dbus-test-runner
  
  testexecdir = $(libdir)/dbus-1.0/test
@@@ -92,9 -110,9 +96,10 @@@ testexec_PROGRAMS 
  installable_tests = \
        test-corrupt \
        test-dbus-daemon \
 +      test-dbus-daemon-eavesdrop \
        test-loopback \
        test-marshal \
+       test-refs \
        test-relay \
        $(NULL)