Commit 5df8c3db authored by Simon McVittie's avatar Simon McVittie

Revert all changes since a36d4918

Someone seems to have merged part of master into 1.4. Again. Let's go
back to the "last known good" point (the branch-point of some 1.4
branches I had locally), then we can cherry-pick the changes that
should have gone in.
parent 5ec835da
......@@ -13,7 +13,6 @@ Christian Ehrlicher <Ch.Ehrlicher@gmx.de>
Christian Persch (GNOME) <chpe@gnome.org>
Colin Walters <walters@verbum.org>
Colin Watson <cjwatson@ubuntu.com>
Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Cristian Rodríguez <cristian.rodriguez@opensuse.org>
Cyril Brulebois <kibi@debian.org>
Daniel P. Berrange <dan@berrange.com>
......
......@@ -154,10 +154,6 @@ To make a release of D-Bus, do the following:
- update the file NEWS based on the git history
- verify that the version number of dbus-specification.xml is
changed if it needs to be; if changes have been made, update the
release date in that file
- update the AUTHORS file with "make update-authors" if necessary
- the version number should have major.minor.micro, even
......@@ -179,8 +175,7 @@ To make a release of D-Bus, do the following:
- bump the version number up in configure.ac (so the micro version is odd),
and commit it. Make sure you do this *after* tagging the previous
release! The idea is that git has a newer version number
than anything released. Similarly, bump the version number of
dbus-specification.xml and set the release date to "(not finalized)".
than anything released.
- merge the branch you've released to the chronologically-later
branch (usually "master"). You'll probably have to fix a merge
......
D-Bus 1.5.10 (UNRELEASED)
D-Bus 1.4.18 (UNRELEASED)
==
D-Bus 1.5.8 (2011-09-21)
D-Bus 1.4.16 (2011-09-21)
==
The "cross-metering" release.
In addition to dead code removal and refactoring, this release contains all
of the bugfixes from 1.4.16.
• Clean up dead code, and make more warnings fatal in development builds
(fd.o #39231, fd.o #41012; Simon McVittie)
The "this answerphone fails to answer the phone" release.
• If full test coverage is requested via --enable-tests, strictly require
Python, pygobject and dbus-python, which are required by some tests; if not,
......@@ -57,37 +51,17 @@ of the bugfixes from 1.4.16.
· Fix compilation on MSVC, which doesn't understand "inline" with its
C99 meaning (fd.o #40000; Ralf Habacker, Simon McVittie)
· Fix misuse of GPid in test/dbus-daemon.c (fd.o #40003, Simon McVittie)
· Fix cross-compilation to Windows with Automake (fd.o #40003, Simon McVittie)
D-Bus 1.5.6 (2011-07-29)
D-Bus 1.4.14 (2011-07-29)
==
The "weird, gravy-like aftertaste" release.
In addition to new features and refactoring, this release contains all of the
bugfixes from 1.4.14.
Potentially incompatible (Bustle and similar debugging tools will need
changes to work as intended):
• Do not allow match rules to "eavesdrop" (receive messages intended for a
different recipient) by mistake: eavesdroppers must now opt-in to this
behaviour by putting "eavesdrop='true'" in the match rule, which will
not have any practical effect on buses where eavesdropping is not allowed
(fd.o #37890, Cosimo Alfarano)
The "Puny receptacle!" release.
Other changes:
• D-Bus Specification version 0.18 (fd.o #37890, fd.o #39450, fd.o #38252;
Cosimo Alfarano, Simon McVittie)
· add the "eavesdrop" keyword to match rules
· define eavesdropping, unicast messages and broadcast messages
· stop claiming that match rules are needed to match unicast messages to you
· promote the type system to be a top-level section
Changes:
• Use DBUS_ERROR_OBJECT_PATH_IN_USE if dbus_connection_try_register_object_path
or dbus_connection_try_register_fallback fails, not ...ADDRESS_IN_USE,
and simplify object-path registration (fd.o #38874, Jiří Klimeš)
or dbus_connection_try_register_fallback fails, not ...ADDRESS_IN_USE
(fd.o #38874, Jiří Klimeš)
• Consistently use atomic operations on everything that is ever manipulated
via atomic ops, as was done for changes to DBusConnection's refcount in
......@@ -99,26 +73,6 @@ Other changes:
• Make "make check" in a clean tree work, by not running tests until
test data has been set up (fd.o #34405, Simon McVittie)
• The dbus-daemon no longer busy-loops if it has a very large number of file
descriptors (fd.o #23194, Simon McVittie)
• Refactor message flow through dispatching to avoid locking violations if
the bus daemon's message limit is hit; remove the per-connection link cache,
which was meant to improve performance, but now reduces it (fd.o #34393,
Simon McVittie)
• Some cmake fixes (Ralf Habacker)
• Remove dead code, mainly from DBusString (fd.o #38570, fd.o #39610;
Simon McVittie, Lennart Poettering)
• Stop storing two extra byte order indicators in each D-Bus message
(fd.o #38287, Simon McVittie)
• Add an optional Stats interface which can be used to get statistics from
a running dbus-daemon if enabled at configure time with --enable-stats
(fd.o #34040, Simon McVittie)
• Fix various typos (fd.o #27227, fd.o #38284; Sascha Silbe, Simon McVittie)
• Documentation (fd.o #36156, Simon McVittie):
......@@ -137,7 +91,7 @@ Other changes:
· fix use of a mutex for autolaunch server detection
· don't crash on malloc failure in _dbus_printf_string_upper_bound
D-Bus 1.5.4 (2011-06-10)
D-Bus 1.4.12 (2011-06-10)
==
Security (local denial of service):
......@@ -178,10 +132,10 @@ Changes:
• Windows-specific changes:
· don't try to build dbus-daemon-launch-helper (fd.o #37838, Mark Brand)
D-Bus 1.5.2 (2011-06-01)
D-Bus 1.4.10 (2011-06-01)
==
The "Boar Hunter" release.
The "Ape Ale" release.
Notes for distributors:
......@@ -195,10 +149,6 @@ Notes for distributors:
Changes:
• D-Bus Specification v0.17
· Reserve the extra characters used in signatures by GVariant
(fd.o #34529, Simon McVittie)
· Define the ObjectManager interface (fd.o #34869, David Zeuthen)
• Don't force -fPIE: distributions and libtool know better than we do whether
it's desirable (fd.o #16621, fd.o #27215; Simon McVittie)
• Allow --disable-gc-sections, in case your toolchain offers the
......@@ -208,8 +158,6 @@ Changes:
(fd.o #14512; Simon McVittie, loosely based on a patch from Luca Barbato)
• Ensure that maintainers upload documentation with the right permissions
(fd.o #36130, Simon McVittie)
• Don't force users of libdbus to be linked against -lpthread, -lrt
(fd.o #32827, Simon McVittie)
• Log system-bus activation information to syslog (fd.o #35705,
Colin Walters)
• Log messages dropped due to quotas to syslog (fd.o #35358,
......@@ -229,28 +177,6 @@ Changes:
• Windows:
• Remove obsolete workaround for winioctl.h (fd.o #35083, Ralf Habacker)
D-Bus 1.5.0 (2011-04-11)
==
The "you never know when you need to tow something from your giant
flying shark" release.
• D-Bus Specification v0.16
· Add support for path_namespace and arg0namespace in match rules
(fd.o #24317, #34870; Will Thompson, David Zeuthen, Simon McVittie)
· Make argNpath support object paths, not just object-path-like strings,
and document it better (fd.o #31818, Will Thompson)
• Let the bus daemon implement more than one interface (fd.o #33757,
Simon McVittie)
• Optimize _dbus_string_replace_len to reduce waste (fd.o #21261,
Roberto Guido)
• Require user intervention to compile with missing 64-bit support
(fd.o #35114, Simon McVittie)
• Add dbus_type_is_valid as public API (fd.o #20496, Simon McVittie)
• Raise UnknownObject instead of UnknownMethod for calls to methods on
paths that are not part of the object tree, and UnknownInterface for calls
to unknown interfaces in the bus daemon (fd.o #34527, Lennart Poettering)
D-Bus 1.4.8 (2011-04-08)
==
......
configdir=$(sysconfdir)/dbus-1
dbus_daemon_execdir = $(DBUS_DAEMONDIR)
DBUS_BUS_LIBS = \
$(XML_LIBS) \
$(SELINUX_LIBS) \
$(THREAD_LIBS) \
$(ADT_LIBS) \
$(NETWORK_libs) \
$(NULL)
DBUS_LAUNCHER_LIBS = \
$(XML_LIBS) \
$(THREAD_LIBS) \
$(NETWORK_libs) \
$(NULL)
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(XML_CFLAGS) \
INCLUDES = -I$(top_srcdir) \
$(DBUS_BUS_CFLAGS) \
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
-DDBUS_COMPILATION \
-DDBUS_STATIC_BUILD \
$(NULL)
# if assertions are enabled, improve backtraces
AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
-DDBUS_COMPILATION
EFENCE=
......@@ -93,8 +73,6 @@ BUS_SOURCES= \
services.h \
signals.c \
signals.h \
stats.c \
stats.h \
test.c \
test.h \
utils.c \
......@@ -105,11 +83,14 @@ dbus_daemon_SOURCES= \
$(BUS_SOURCES) \
main.c
dbus_daemon_CPPFLAGS = -DDBUS_STATIC_BUILD
dbus_daemon_LDADD= \
$(top_builddir)/dbus/libdbus-internal.la \
$(EFENCE) \
$(DBUS_BUS_LIBS)
dbus_daemon_LDFLAGS=@R_DYNAMIC_LDFLAG@
LAUNCH_HELPER_SOURCES= \
$(XML_SOURCES) \
config-parser-common.c \
......@@ -129,10 +110,13 @@ dbus_daemon_launch_helper_SOURCES= \
activation-helper-bin.c \
$(LAUNCH_HELPER_SOURCES)
dbus_daemon_launch_helper_CPPFLAGS = -DDBUS_STATIC_BUILD
dbus_daemon_launch_helper_LDADD= \
$(top_builddir)/dbus/libdbus-internal.la \
$(DBUS_LAUNCHER_LIBS)
dbus_daemon_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@
## we build another binary so we can do the launch testing without root privs.
## DO NOT INSTALL THIS FILE
dbus_daemon_launch_helper_test_SOURCES= \
......@@ -143,8 +127,8 @@ dbus_daemon_launch_helper_test_LDADD= \
$(top_builddir)/dbus/libdbus-internal.la \
$(DBUS_LAUNCHER_LIBS)
dbus_daemon_launch_helper_test_CPPFLAGS = \
$(AM_CPPFLAGS) \
dbus_daemon_launch_helper_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
dbus_daemon_launch_helper_test_CPPFLAGS= -DDBUS_STATIC_BUILD \
-DACTIVATION_LAUNCHER_TEST
## we build yet another binary so we can do the OOM tests
......@@ -157,8 +141,8 @@ bus_test_launch_helper_LDADD= \
$(top_builddir)/dbus/libdbus-internal.la \
$(DBUS_LAUNCHER_LIBS)
bus_test_launch_helper_CPPFLAGS = \
$(AM_CPPFLAGS) \
bus_test_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@
bus_test_launch_helper_CPPFLAGS= -DDBUS_STATIC_BUILD \
-DACTIVATION_LAUNCHER_TEST \
-DACTIVATION_LAUNCHER_DO_OOM
......@@ -199,13 +183,17 @@ bus_test_system_SOURCES= \
utils.h \
test-system.c
bus_test_system_CPPFLAGS = -DDBUS_STATIC_BUILD
bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
bus_test_system_LDFLAGS=@R_DYNAMIC_LDFLAG@
bus_test_SOURCES= \
$(BUS_SOURCES) \
test-main.c
bus_test_CPPFLAGS = -DDBUS_STATIC_BUILD
bus_test_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
bus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
## mop up the gcov files
clean-local:
......
......@@ -144,10 +144,10 @@ out_all:
static dbus_bool_t
clear_environment (DBusError *error)
{
const char *starter_env = NULL;
#ifdef DBUS_ENABLE_VERBOSE_MODE
const char *debug_env = NULL;
const char *starter_env = NULL;
#ifdef DBUS_ENABLE_VERBOSE_MODE
/* are we debugging */
debug_env = _dbus_getenv ("DBUS_VERBOSE");
#endif
......@@ -184,7 +184,6 @@ clear_environment (DBusError *error)
static dbus_bool_t
check_permissions (const char *dbus_user, DBusError *error)
{
#ifndef ACTIVATION_LAUNCHER_TEST
uid_t uid, euid;
struct passwd *pw;
......@@ -192,6 +191,7 @@ check_permissions (const char *dbus_user, DBusError *error)
uid = 0;
euid = 0;
#ifndef ACTIVATION_LAUNCHER_TEST
/* bail out unless the dbus user is invoking the helper */
pw = getpwnam(dbus_user);
if (!pw)
......@@ -403,15 +403,12 @@ get_correct_parser (BusConfigParser **parser, DBusError *error)
{
DBusString config_file;
dbus_bool_t retval;
#ifdef ACTIVATION_LAUNCHER_TEST
const char *test_config_file;
#endif
retval = FALSE;
#ifdef ACTIVATION_LAUNCHER_TEST
test_config_file = NULL;
#ifdef ACTIVATION_LAUNCHER_TEST
/* there is no _way_ we should be setuid if this define is set.
* but we should be doubly paranoid and check... */
if (getuid() != geteuid())
......
......@@ -143,6 +143,16 @@ bus_pending_activation_entry_free (BusPendingActivationEntry *entry)
dbus_free (entry);
}
static void
handle_timeout_callback (DBusTimeout *timeout,
void *data)
{
BusPendingActivation *pending_activation = data;
while (!dbus_timeout_handle (pending_activation->timeout))
_dbus_wait_for_memory ();
}
static BusPendingActivation *
bus_pending_activation_ref (BusPendingActivation *pending_activation)
{
......@@ -169,7 +179,8 @@ bus_pending_activation_unref (BusPendingActivation *pending_activation)
if (pending_activation->timeout_added)
{
_dbus_loop_remove_timeout (bus_context_get_loop (pending_activation->activation->context),
pending_activation->timeout);
pending_activation->timeout,
handle_timeout_callback, pending_activation);
pending_activation->timeout_added = FALSE;
}
......@@ -884,6 +895,8 @@ bus_activation_new (BusContext *context,
DBusError *error)
{
BusActivation *activation;
DBusList *link;
char *dir;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
......@@ -1324,16 +1337,22 @@ handle_servicehelper_exit_error (int exit_code,
}
}
static void
pending_activation_finished_cb (DBusBabysitter *babysitter,
void *data)
static dbus_bool_t
babysitter_watch_callback (DBusWatch *watch,
unsigned int condition,
void *data)
{
BusPendingActivation *pending_activation = data;
dbus_bool_t retval;
DBusBabysitter *babysitter;
dbus_bool_t uses_servicehelper;
_dbus_assert (babysitter == pending_activation->babysitter);
babysitter = pending_activation->babysitter;
_dbus_babysitter_ref (babysitter);
retval = dbus_watch_handle (watch, condition);
/* There are two major cases here; are we the system bus or the session? Here this
* is distinguished by whether or not we use a setuid helper launcher. With the launch helper,
* some process exit codes are meaningful, processed by handle_servicehelper_exit_error.
......@@ -1344,7 +1363,15 @@ pending_activation_finished_cb (DBusBabysitter *babysitter,
*/
uses_servicehelper = bus_context_get_servicehelper (pending_activation->activation->context) != NULL;
/* strictly speaking this is redundant with the check in dbus-spawn now */
/* FIXME this is broken in the same way that
* connection watches used to be; there should be
* a separate callback for status change, instead
* of doing "if we handled a watch status might
* have changed"
*
* Fixing this lets us move dbus_watch_handle
* calls into dbus-mainloop.c
*/
if (_dbus_babysitter_get_child_exited (babysitter))
{
DBusError error;
......@@ -1404,6 +1431,8 @@ pending_activation_finished_cb (DBusBabysitter *babysitter,
}
_dbus_babysitter_unref (babysitter);
return retval;
}
static dbus_bool_t
......@@ -1412,9 +1441,9 @@ add_babysitter_watch (DBusWatch *watch,
{
BusPendingActivation *pending_activation = data;
return _dbus_loop_add_watch (
bus_context_get_loop (pending_activation->activation->context),
watch);
return _dbus_loop_add_watch (bus_context_get_loop (pending_activation->activation->context),
watch, babysitter_watch_callback, pending_activation,
NULL);
}
static void
......@@ -1424,7 +1453,7 @@ remove_babysitter_watch (DBusWatch *watch,
BusPendingActivation *pending_activation = data;
_dbus_loop_remove_watch (bus_context_get_loop (pending_activation->activation->context),
watch);
watch, babysitter_watch_callback, pending_activation);
}
static dbus_bool_t
......@@ -1672,6 +1701,7 @@ bus_activation_activate_service (BusActivation *activation,
char **envp = NULL;
int argc;
dbus_bool_t retval;
DBusHashIter iter;
dbus_bool_t was_pending_activation;
DBusString command;
......@@ -1833,7 +1863,10 @@ bus_activation_activate_service (BusActivation *activation,
}
if (!_dbus_loop_add_timeout (bus_context_get_loop (activation->context),
pending_activation->timeout))
pending_activation->timeout,
handle_timeout_callback,
pending_activation,
NULL))
{
_dbus_verbose ("Failed to add timeout for pending activation\n");
......@@ -2103,10 +2136,6 @@ bus_activation_activate_service (BusActivation *activation,
_dbus_assert (pending_activation->babysitter != NULL);
_dbus_babysitter_set_result_function (pending_activation->babysitter,
pending_activation_finished_cb,
pending_activation);
if (!_dbus_babysitter_set_watch_functions (pending_activation->babysitter,
add_babysitter_watch,
remove_babysitter_watch,
......@@ -2538,18 +2567,14 @@ bus_activation_service_reload_test (const DBusString *test_data_dir)
_dbus_assert_not_reached ("could not initiate service reload test");
if (!do_service_reload_test (&directory, FALSE))
{
/* Do nothing? */
}
; /* Do nothing? */
/* Do OOM tests */
if (!init_service_reload_test (&directory))
_dbus_assert_not_reached ("could not initiate service reload test");
if (!do_service_reload_test (&directory, TRUE))
{
/* Do nothing? */
}
; /* Do nothing? */
/* Cleanup test directory */
if (!cleanup_service_reload_test (&directory))
......
......@@ -102,6 +102,19 @@ server_get_context (DBusServer *server)
return context;
}
static dbus_bool_t
server_watch_callback (DBusWatch *watch,
unsigned int condition,
void *data)
{
/* FIXME this can be done in dbus-mainloop.c
* if the code in activation.c for the babysitter
* watch handler is fixed.
*/
return dbus_watch_handle (watch, condition);
}
static dbus_bool_t
add_server_watch (DBusWatch *watch,
void *data)
......@@ -111,7 +124,9 @@ add_server_watch (DBusWatch *watch,
context = server_get_context (server);
return _dbus_loop_add_watch (context->loop, watch);
return _dbus_loop_add_watch (context->loop,
watch, server_watch_callback, server,
NULL);
}
static void
......@@ -123,7 +138,17 @@ remove_server_watch (DBusWatch *watch,
context = server_get_context (server);
_dbus_loop_remove_watch (context->loop, watch);
_dbus_loop_remove_watch (context->loop,
watch, server_watch_callback, server);
}
static void
server_timeout_callback (DBusTimeout *timeout,
void *data)
{
/* can return FALSE on OOM but we just let it fire again later */
dbus_timeout_handle (timeout);
}
static dbus_bool_t
......@@ -135,7 +160,8 @@ add_server_timeout (DBusTimeout *timeout,
context = server_get_context (server);
return _dbus_loop_add_timeout (context->loop, timeout);
return _dbus_loop_add_timeout (context->loop,
timeout, server_timeout_callback, server, NULL);
}
static void
......@@ -147,7 +173,8 @@ remove_server_timeout (DBusTimeout *timeout,
context = server_get_context (server);
_dbus_loop_remove_timeout (context->loop, timeout);
_dbus_loop_remove_timeout (context->loop,
timeout, server_timeout_callback, server);
}
static void
......@@ -481,6 +508,7 @@ process_config_every_time (BusContext *context,
DBusString full_address;
DBusList *link;
DBusList **dirs;
BusActivation *new_activation;
char *addr;
const char *servicehelper;
char *s;
......@@ -687,6 +715,7 @@ bus_context_new (const DBusString *config_file,
dbus_bool_t systemd_activation,
DBusError *error)
{
DBusString log_prefix;
BusContext *context;
BusConfigParser *parser;
......@@ -1391,6 +1420,9 @@ bus_context_check_security_policy (BusContext *context,
dbus_bool_t log;
int type;
dbus_bool_t requested_reply;
const char *sender_name;
const char *sender_loginfo;
const char *proposed_recipient_loginfo;
type = dbus_message_get_type (message);
dest = dbus_message_get_destination (message);
......@@ -1556,6 +1588,9 @@ bus_context_check_security_policy (BusContext *context,
proposed_recipient,
message, &toggles, &log))
{
const char *msg = "Rejected send message, %d matched rules; "
"type=\"%s\", sender=\"%s\" (%s) interface=\"%s\" member=\"%s\" error name=\"%s\" requested_reply=%d destination=\"%s\" (%s))";
complain_about_message (context, DBUS_ERROR_ACCESS_DENIED,
"Rejected send message", toggles,
message, sender, proposed_recipient, requested_reply,
......
......@@ -3271,12 +3271,11 @@ test_default_session_servicedirs (void)
DBusList *dirs;
DBusList *link;
DBusString progs;
const char *common_progs;
int i;
#ifdef DBUS_WIN
const char *common_progs;
char buffer[1024];
if (_dbus_get_install_root(buffer, sizeof(buffer)))
{
strcat(buffer,DBUS_DATADIR);
......@@ -3290,9 +3289,8 @@ test_default_session_servicedirs (void)
if (!_dbus_string_init (&progs))
_dbus_assert_not_reached ("OOM allocating progs");
#ifndef DBUS_UNIX
common_progs = _dbus_getenv ("CommonProgramFiles");
#ifndef DBUS_UNIX
if (common_progs)
{
if (!_dbus_string_append (&progs, common_progs))
......@@ -3413,9 +3411,7 @@ test_default_system_servicedirs (void)
DBusList *dirs;
DBusList *link;
DBusString progs;
#ifndef DBUS_UNIX
const char *common_progs;
#endif
int i;
/* On Unix we don't actually use this variable, but it's easier to handle the
......@@ -3423,9 +3419,8 @@ test_default_system_servicedirs (void)
if (!_dbus_string_init (&progs))
_dbus_assert_not_reached ("OOM allocating progs");
#ifndef DBUS_UNIX
common_progs = _dbus_getenv ("CommonProgramFiles");
#ifndef DBUS_UNIX
if (common_progs)
{
if (!_dbus_string_append (&progs, common_progs))
......
......@@ -62,16 +62,6 @@ struct BusConnections
DBusTimeout *expire_timeout; /**< Timeout for expiring incomplete connections. */
int stamp; /**< Incrementing number */
BusExpireList *pending_replies; /**< List of pending replies */
#ifdef DBUS_ENABLE_STATS
int total_match_rules;
int peak_match_rules;
int peak_match_rules_per_conn;
int total_bus_names;
int peak_bus_names;
int peak_bus_names_per_conn;
#endif
};
static dbus_int32_t connection_data_slot = -1;
......@@ -97,11 +87,6 @@ typedef struct
long connection_tv_sec; /**< Time when we connected (seconds component) */
long connection_tv_usec; /**< Time when we connected (microsec component) */
int stamp; /**< connections->stamp last time we were traversed */
#ifdef DBUS_ENABLE_STATS
int peak_match_rules;
int peak_bus_names;
#endif
} BusConnectionData;
static dbus_bool_t bus_pending_reply_expired (BusExpireList *list,
......@@ -309,13 +294,31 @@ bus_connection_disconnected (DBusConnection *connection)
dbus_connection_unref (connection);
}
static dbus_bool_t
connection_watch_callback (DBusWatch *watch,
unsigned int condition,
void *data)
{
/* FIXME this can be done in dbus-mainloop.c
* if the code in activation.c for the babysitter
* watch handler is fixed.
*/
#if 0
_dbus_verbose ("Calling handle_watch\n");
#endif
return dbus_watch_handle (watch, condition);
}
static dbus_bool_t
add_connection_watch (DBusWatch *watch,
void *data)
{
DBusConnection *connection = data;
return _dbus_loop_add_watch (connection_get_loop (connection), watch);
return _dbus_loop_add_watch (connection_get_loop (connection),
watch, connection_watch_callback, connection,
NULL);
}
static void
......@@ -324,7 +327,18 @@ remove_connection_watch (DBusWatch *watch,
{
DBusConnection *connection = data;
_dbus_loop_remove_watch (connection_get_loop (connection), watch);
_dbus_loop_remove_watch (connection_get_loop (connection),
watch, connection_watch_callback, connection);
}
static void
connection_timeout_callback (DBusTimeout *timeout,
void *data)
{
/* DBusConnection *connection = data; */
/* can return FALSE on OOM but we just let it fire again later */
dbus_timeout_handle (timeout);
}
static dbus_bool_t
......@@ -333,7 +347,8 @@ add_connection_timeout (DBusTimeout *timeout,
{
DBusConnection *connection = data;