mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-24 13:38:10 +02:00
* dbus/dbus-connection.c (_dbus_connection_close_if_only_one_ref):
Add a hack to make DBusNewConnectionFunction work right.
* dbus/dbus-server-socket.c (handle_new_client_fd_and_unlock): use
the hack here. Also, fix the todo about refcount leak.
* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
and use the hack here
* dbus/dbus-connection.c: Kill the "shared" flag vs. the
"shareable" flag; this was completely broken, since it meant
dbus_connection_open() returned a connection of unknown
shared-ness. Now, we always hold a ref on anything opened
as shareable.
Move the call to notify dbus-bus.c into
connection_forget_shared_unlocked, so libdbus consistently forgets
all its knowledge of a connection at once. This exposed numerous
places where things were totally broken if we dropped a ref inside
get_dispatch_status_unlocked where
connection_forget_shared_unlocked was previously, so move
connection_forget_shared_unlocked into
_dbus_connection_update_dispatch_status_and_unlock. Also move the
exit_on_disconnect here.
(shared_connections_shutdown): this assumed weak refs to the
shared connections; since we have strong refs now, the assertion
was failing and stuff was left in the hash. Fix it to close
still-open shared connections.
* bus/dispatch.c: fixup to use dbus_connection_open_private on the
debug pipe connections
* dbus/dbus-connection.c (dbus_connection_dispatch): only notify
dbus-bus.c if the closed connection is in fact shared
(_dbus_connection_close_possibly_shared): rename from
_dbus_connection_close_internal
(dbus_connection_close, dbus_connection_open,
dbus_connection_open_private): Improve docs to explain the deal
with when you should close or unref or both
* dbus/dbus-bus.c
(_dbus_bus_notify_shared_connection_disconnected_unlocked): rename
from _dbus_bus_check_connection_and_unref_unlocked and modify to
loop over all connections
* test/test-utils.c (test_connection_shutdown): don't try to close
shared connections.
* test/name-test/test-threads-init.c (main): fix warnings in here
* dbus/dbus-sysdeps.c (_dbus_abort): support DBUS_BLOCK_ON_ABORT
env variable to cause blocking waiting for gdb; drop
DBUS_PRINT_BACKTRACE and just call _dbus_print_backtrace()
unconditionally.
* configure.in: add -export-dynamic to libtool flags if assertions enabled
so _dbus_print_backtrace works.
* dbus/dbus-sysdeps-unix.c (_dbus_print_backtrace): use fprintf
instead of _dbus_verbose to print the backtrace, and diagnose lack
of -rdynamic/-export-dynamic
149 lines
3.1 KiB
Makefile
149 lines
3.1 KiB
Makefile
|
|
configdir=$(sysconfdir)/dbus-1
|
|
|
|
INCLUDES=-I$(top_srcdir) $(DBUS_BUS_CFLAGS) \
|
|
-DDAEMON_NAME=\"dbus-daemon\" -DDBUS_COMPILATION \
|
|
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
|
|
-DDBUS_SESSION_CONFIG_FILE=\""$(configdir)/session.conf"\"
|
|
|
|
EFENCE=
|
|
|
|
CONFIG_IN_FILES= \
|
|
session.conf.in \
|
|
system.conf.in
|
|
|
|
config_DATA= \
|
|
session.conf \
|
|
system.conf
|
|
|
|
if DBUS_USE_LIBXML
|
|
XML_SOURCES=config-loader-libxml.c
|
|
endif
|
|
if DBUS_USE_EXPAT
|
|
XML_SOURCES=config-loader-expat.c
|
|
endif
|
|
|
|
if DBUS_BUS_ENABLE_KQUEUE
|
|
DIR_WATCH_SOURCE=dir-watch-kqueue.c
|
|
else
|
|
if DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
|
|
DIR_WATCH_SOURCE=dir-watch-dnotify.c
|
|
else
|
|
DIR_WATCH_SOURCE=dir-watch-default.c
|
|
endif
|
|
endif
|
|
|
|
BUS_SOURCES= \
|
|
activation.c \
|
|
activation.h \
|
|
bus.c \
|
|
bus.h \
|
|
config-parser.c \
|
|
config-parser.h \
|
|
connection.c \
|
|
connection.h \
|
|
desktop-file.c \
|
|
desktop-file.h \
|
|
$(DIR_WATCH_SOURCE) \
|
|
dir-watch.h \
|
|
dispatch.c \
|
|
dispatch.h \
|
|
driver.c \
|
|
driver.h \
|
|
expirelist.c \
|
|
expirelist.h \
|
|
policy.c \
|
|
policy.h \
|
|
selinux.h \
|
|
selinux.c \
|
|
services.c \
|
|
services.h \
|
|
signals.c \
|
|
signals.h \
|
|
test.c \
|
|
test.h \
|
|
utils.c \
|
|
utils.h \
|
|
$(XML_SOURCES)
|
|
|
|
dbus_daemon_SOURCES= \
|
|
$(BUS_SOURCES) \
|
|
main.c
|
|
|
|
dbus_daemon_LDADD= \
|
|
$(EFENCE) \
|
|
$(DBUS_BUS_LIBS) \
|
|
$(top_builddir)/dbus/libdbus-convenience.la
|
|
|
|
dbus_daemon_LDFLAGS=@R_DYNAMIC_LDFLAG@
|
|
|
|
## note that TESTS has special meaning (stuff to use in make check)
|
|
## so if adding tests not to be run in make check, don't add them to
|
|
## TESTS
|
|
if DBUS_BUILD_TESTS
|
|
TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus DBUS_FATAL_WARNINGS=1 DBUS_BLOCK_ON_ABORT=1
|
|
TESTS=bus-test
|
|
else
|
|
TESTS=
|
|
endif
|
|
|
|
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
|
|
## even when not doing "make check"
|
|
noinst_PROGRAMS=$(TESTS) dbus-daemon
|
|
|
|
bus_test_SOURCES= \
|
|
$(BUS_SOURCES) \
|
|
test-main.c
|
|
|
|
bus_test_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS)
|
|
bus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
|
|
|
|
## mop up the gcov files
|
|
clean-local:
|
|
/bin/rm *.bb *.bbg *.da *.gcov || true
|
|
|
|
uninstall-hook:
|
|
rm -f $(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon
|
|
|
|
install-data-hook:
|
|
if test '!' -d $(DESTDIR)$(DBUS_DAEMONDIR); then \
|
|
$(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \
|
|
chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \
|
|
fi
|
|
$(INSTALL_PROGRAM) dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR)
|
|
$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
|
|
$(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
|
|
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
|
|
|
|
#### Init scripts fun
|
|
SCRIPT_IN_FILES=messagebus.in \
|
|
rc.messagebus.in
|
|
|
|
## Red Hat start
|
|
if DBUS_INIT_SCRIPTS_RED_HAT
|
|
|
|
initddir=$(sysconfdir)/rc.d/init.d
|
|
|
|
initd_SCRIPTS= \
|
|
messagebus
|
|
|
|
endif
|
|
## Red Hat end
|
|
|
|
## Slackware start
|
|
if DBUS_INIT_SCRIPTS_SLACKWARE
|
|
|
|
initddir=$(sysconfdir)/rc.d/
|
|
|
|
initd_SCRIPTS= \
|
|
rc.messagebus
|
|
|
|
endif
|
|
## Slackware end
|
|
|
|
MAN_IN_FILES=dbus-daemon.1.in
|
|
man_MANS = dbus-daemon.1
|
|
|
|
#### Extra dist
|
|
|
|
EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES)
|