Commit graph

2234 commits

Author SHA1 Message Date
Romain Pokrzywka
d4440ef7bb fixes bug where sometimes objects were not unregistered from dbus
although their app had exited. As it turns out it was a missing
implementation of the method _dbus_fd_set_close_on_exec() for windows.
It's been tested with msvc2005, msvc2008, and mingw, and solves
all the unregistering issues on many kde apps.
2010-01-14 09:10:25 +01:00
Will Thompson
0411f9d632 Rename DBusConnection *disconnected param to connection 2010-01-05 21:11:13 +01:00
Will Thompson
b4264cb0e6 Group match rules by their interface.
In my informal studies of "normal" sets of match rules, only checking
match rules with the appropriate interface for the message reduces the
number that need to be checked by almost 100x on average (ranging from
halving for messages from the bus daemon, to a >200x reduction in many
cases). This reduces the overhead added to dispatching each message by
having lots of irrelevant match rules.
2010-01-05 21:11:12 +01:00
Will Thompson
86d0d2baf5 Extract rule_list_remove_by_connection 2010-01-05 21:11:12 +01:00
Will Thompson
a2c4eca52a Extract freeing a DBusList<BusMatchRule> 2010-01-05 21:11:11 +01:00
Will Thompson
38ead76613 Don't bother re-matching features we've checked.
This is currently not a big deal, but will make more of a difference
once the set of match rules is partitioned by more features than just
the message type.
2010-01-05 21:11:10 +01:00
Will Thompson
647912b81f Index match rules by message type
This avoids scanning all the signal matches while dispatching method
calls and returns, which are rarely matched against.
2010-01-05 21:11:09 +01:00
Will Thompson
a6a21bf335 Add a constant for the number of message types 2010-01-05 21:11:09 +01:00
Ralf Habacker
622e66944c added tranport address format to dbus specification 2009-12-23 23:28:48 +01:00
Ralf Habacker
658be8be7b added initial tcp transport section 2009-12-23 11:11:20 +01:00
Ralf Habacker
fdf24b805e nonce tcp support requires _dbus_string_equal_len also when build without tests 2009-12-23 10:43:53 +01:00
Ralf Habacker
14c31804ad fixed install root when using msvc ide 2009-12-22 10:53:05 +01:00
Ralf Habacker
7f3e29ffdf let dbus_verbose print file name, line number and function name if available; this eases debugging. 2009-12-19 20:51:54 +01:00
Ralf Habacker
25ac34ab64 removed local definition of _DBUS_GNUC_PRINTF, it is already in dbus-macro.h 2009-12-18 17:40:44 +01:00
Ralf Habacker
68fb041ac3 DBusPipe related unix compile fix 2009-12-18 17:35:43 +01:00
Ralf Habacker
8a4429ff86 added pipe related files real 2009-12-18 16:54:44 +01:00
Ralf Habacker
182a261baf Merge branch 'master' of ssh://git.freedesktop.org/git/dbus/dbus 2009-12-18 16:46:11 +01:00
Ralf Habacker
be51ff7e5e windows does not support fork, skip it 2009-12-18 16:45:50 +01:00
Ralf Habacker
35eb740bda moved out DBusPipe implementation into separate files 2009-12-18 14:18:22 +01:00
Ralf Habacker
49728a47b2 moved out DBusPipe implementation from into separate files 2009-12-18 13:32:37 +01:00
Colin Walters
949a64b127 Ignore exit code zero from activated services
A variety of system components have migrated from legacy init into DBus
service activation.  Many of these system components "daemonize", which
involves forking.  The DBus activation system treated an exit as an
activation failure, assuming that the child process which grabbed the
DBus name didn't run first.

While we're in here, also differentiate in this code path between the
servicehelper (system) versus direct activation (session) paths.  In
the session activation path our error message mentioned a helper
process which was confusing, since none was involved.

Based on a patch and debugging research from Ray Strode <rstrode@redhat.com>
2009-12-15 13:08:02 -05:00
Ralf Habacker
aab383a63e added new variable DBUS_BUILD_TIMESTAMP 2009-12-14 23:31:38 +01:00
Ralf Habacker
f27dd9b8f2 fixed memory leak 2009-12-07 10:16:10 +01:00
Ralf Habacker
b0e77f0da3 most patches are obsolate 2009-12-07 01:07:08 +01:00
Ralf Habacker
492e0ae06a fixed cmake version macro and string handling 2009-12-07 00:49:42 +01:00
Ralf Habacker
0c31f84932 added cmake option for using nonce-tcp protocol as default; set tcp as default protocol to be compatible with earlier dbus releases 2009-12-01 12:01:11 +01:00
Ralf Habacker
c0fa33dc5f fixed crashes accessing not initiated noncefile member struct 2009-12-01 11:43:20 +01:00
Ralf Habacker
7c0fbba5b5 cleanup nonce socket only when really used 2009-12-01 11:18:39 +01:00
Ralf Habacker
73b926275f uses tcp based test connections for now 2009-12-01 11:17:40 +01:00
Ralf Habacker
0992fb826d dbus-daemon needs more exports 2009-12-01 11:16:29 +01:00
Ralf Habacker
4a24e84aa7 readded test files required for windows 2009-12-01 10:53:53 +01:00
Ralf Habacker
c4276d5901 removed unsupported symbols for msvc 2009-12-01 10:51:17 +01:00
Tor Lillqvist
9601b11eeb Drop unused complex function
Drop _dbus_user_at_console() from dbus-sysdeps-util-win.c. It is
called only from dbus-userdb-util.c which isn't compiled on Windows.
2009-12-01 10:28:11 +01:00
Tor Lillqvist
fed50076e6 Set the DBusError
Put the correct error code and a relevant message into the DBusError
in _dbus_unix_user_is_at_console().
2009-12-01 10:28:09 +01:00
Tor Lillqvist
ad8bc4c6b3 Don't fake network errno values on Windows
Don't pretend there exists errno values for some network errors in the
Microsoft C library. Just use the WinSock error values.
2009-12-01 10:28:07 +01:00
Tor Lillqvist
9bb7297ad7 Handle also WinSock errors in _dbus_error_from_errno
Handle those WinSock errors that match the errno values handled. Don't
bother handling those errors that are mapped to DBUS_ERROR_FAILED in
the switch as that is the default return value anyway.
2009-12-01 10:28:05 +01:00
Frank Osterfeld
d9e4725fa9 Windows fixes
Replace dbus_daemon_init() by dbus_publish_session_bus_address(),
publishing the full address. Omit username from mutexes (not necessary
as mutex names are local to session). Don't exit if publishing the
address failed (allow multiple session bus instances per
session). Based on 00ee92ae314 by Tor Lillqvist.

Cherry-picked from commit 23945513e9a4da61d286ebfbce3897aa061ddbfe in
the dbus4win repository by tml@iki.fi. Remove claim of that commit not
being merged from README.dbus4win.
2009-12-01 10:28:00 +01:00
Tor Lillqvist
459c19b9dd Avoid warnings on Windows
Remove unused functions, or put in #if 0 if potentially useful. Make
internal functions used just in one file static. Use -Werror after all
also on Windows. Construct the installation root from the location of
the dbus DLL, not from the location of the program .exe of the
process.
2009-12-01 10:27:54 +01:00
Ralf Habacker
2213a8511a used dbus/dbus-1.def for cmake too 2009-12-01 10:20:55 +01:00
Ralf Habacker
61bbff6733 added missing symbols for bus-test 2009-12-01 10:20:38 +01:00
Ralf Habacker
6738ac8933 updated version 2009-12-01 10:18:46 +01:00
Tor Lillqvist
6ac1cf2ec8 Drop terminating slash in _dbus_get_tmpdir
The callers will append strings starting with a slash anyway.
2009-12-01 09:26:00 +01:00
Tor Lillqvist
475dc2fc73 Use nonce-tcp default session bus on Windows 2009-12-01 09:25:59 +01:00
Tor Lillqvist
4c92983dce Check for dirent.h 2009-12-01 09:20:36 +01:00
Tor Lillqvist
e5cdc669ab DBUS_VERSION is always three numbers
No *-rc* possible. So drop strange crap manipulating it for
BUILD_FILEVERSION. Drop duplicate AC_SUBST.
2009-12-01 09:20:36 +01:00
Tor Lillqvist
52c35a3137 Actually do install the .def file on Windows 2009-12-01 09:20:35 +01:00
Tor Lillqvist
861989a35d Use dbus-1.def on Windows 2009-12-01 09:20:34 +01:00
Tor Lillqvist
b31da00fe3 Drop internal symbols, add missing symbols 2009-12-01 09:20:33 +01:00
Tor Lillqvist
576da7cd31 Add a dbus/dbus-1.def file
From cmake/dbus/dbus-1.def.cmake
2009-12-01 09:20:32 +01:00
Tor Lillqvist
99371721af Don't use DBUS_DIR_SEPARATOR
I didn't cherry-pick the commit from dbus4win that introduced
DBUS_DIR_SEPARATOR, as I think it just uglifies the code with little
gain. (Forward) slashes work fine on Windows.
2009-12-01 09:20:31 +01:00