Simon McVittie
377051ee79
_dbus_open_unix_socket: make static
...
It isn't called from outside its translation unit.
2011-07-18 15:16:00 +01:00
Simon McVittie
1423b4a64d
_dbus_open_tcp_socket: remove
...
It's only implemented on Unix, internal to dbus, and never called.
2011-07-18 15:15:58 +01:00
Simon McVittie
c774ca2101
Merge branch 'dbus-1.4'
2011-07-18 15:15:45 +01:00
Simon McVittie
af13ae7e43
_dbus_connect_tcp_socket_with_nonce: don't create an extra fd (which is then leaked)
...
This block should have been deleted in 2007, when IPv6 support was added:
previously, the fd allocated at the beginning of the function was used
for connect(), but for IPv6 support, the socket() call has to be inside
the loop over getaddrinfo() results so its address family can be changed.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37258
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-07-18 15:11:47 +01:00
Simon McVittie
e9197996fe
Merge branch 'dbus-1.4'
2011-07-14 16:49:02 +01:00
Simon McVittie
c6c1874179
DBusServer: exclusively use atomic operations on the refcount
...
Same reasoning as for fd.o #38005 , commit 50732523a7 .
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
Bug-NB: NB#263436
2011-07-14 16:37:46 +01:00
Simon McVittie
6d65b409f9
DBusPendingCall: exclusively use atomic operations on the refcount
...
Same reasoning as for fd.o #38005 , commit 50732523a7 .
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
Bug-NB: NB#263436
2011-07-14 16:37:05 +01:00
Cosimo Alfarano
b86e967d63
Add testsuite for eavesdrop=true DBusMatchRule
...
[with some typos fixed during commit -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37890
Bug-NB: NB#269748
2011-07-14 16:25:20 +01:00
Cosimo Alfarano
f997b0ac48
Fix dbus-monitor using eavesdrop=true when no filters are passed
...
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-07-12 18:36:40 +01:00
Simon McVittie
cb843a5643
DBusHeader: only store byte-order in the fixed-length header
...
Reviewed-by: Thiago Macieira <thiago@kde.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38287
2011-07-11 17:55:13 +01:00
Simon McVittie
47fb9da6ad
DBusMessage: don't redundantly store byte order, ask the DBusHeader
...
Reviewed-by: Thiago Macieira <thiago@kde.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38287
2011-07-11 17:54:36 +01:00
Cosimo Alfarano
56b9629d69
Add "eavesdrop=true" as constant match rule for dbus-monitor
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37890
Bug-NB: NB#269748
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-07-11 17:03:54 +01:00
Cosimo Alfarano
a940e7b1d1
Do not allow eavedropping unless rule owner explicitely declare it
...
Adds "eavesdrop=true" as a match rule, meaning that the owner
intend to eavedrop.
Otherwise the owner will receive only broadcasted messages and the ones
meant to be delivered to it.
[plus a typo fix in an error message -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37890
Bug-NB: NB#269748
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-07-11 17:03:20 +01:00
Simon McVittie
0ecd0a02b9
Merge remote-tracking branch 'origin/dbus-1.4'
2011-07-11 13:23:38 +01:00
Jiří Klimeš
ea8aabf0be
DBusConnection: simplify registering object paths code
...
Introduce static generic _dbus_connection_register_object_path()
function to remove duplicate code for registration object paths.
Having *four* almost the same functions is error-prone and hard
to follow as well.
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38874
2011-07-11 13:23:23 +01:00
Simon McVittie
fa1a85e121
Cope with platforms whose vsnprintf violates both POSIX and C99 - part 1
2011-07-08 11:00:12 +02:00
Simon McVittie
7b63fe3cfa
In Windows _dbus_printf_string_upper_bound, don't crash on malloc failure
2011-07-08 11:00:02 +02:00
Ralf Habacker
110e06a78c
Added DBUS_ENABLE_STATS option to cmake buildsystem to keep in sync with autotools.
2011-07-08 10:55:46 +02:00
Ralf Habacker
0161eb8c34
Visual Studio Professional uses a different ide starter - pointed out by Romain Pokrzywka
2011-07-08 10:55:16 +02:00
Ralf Habacker
836b84a05a
Collected cmake doc into README.cmake.
2011-07-08 10:55:03 +02:00
Ralf Habacker
ba9178b153
Visual Studio Professional uses a different ide starter - pointed out by Romain Pokrzywka
2011-07-08 10:53:20 +02:00
Ralf Habacker
1fd58d6db4
win32 fix: Keep server autolaunch mutex settings according to client detection algorithmus.
2011-07-05 19:45:23 +02:00
Ralf Habacker
4ee7b07b20
Fixed cmake buildsystem - option command only supports boolean values
2011-07-04 23:47:45 +02:00
Simon McVittie
b32aaa8a57
Cope with platforms whose vsnprintf violates both POSIX and C99 - part 1
2011-07-03 06:47:39 +02:00
Simon McVittie
e7bd2bb848
In Windows _dbus_printf_string_upper_bound, don't crash on malloc failure
2011-07-03 06:36:07 +02:00
Ralf Habacker
84b03cae58
Limit batch file creating to windows
2011-07-03 01:39:09 +02:00
Ralf Habacker
b77885c1db
Fixed cmake buildsystem on unix - option command only supports boolean values
2011-07-03 01:36:48 +02:00
Ralf Habacker
6321a98492
Collected cmake doc into README.cmake.
2011-07-02 21:02:46 +02:00
Ralf Habacker
a7f98d8819
Added DBUS_ENABLE_STATS option to cmake buildsystem to keep in sync with autotools.
2011-07-02 00:53:23 +02:00
Ralf Habacker
e2f94ea14f
win32 fix: Keep server autolaunch mutex settings according to client detection algorithmus.
2011-07-01 16:28:19 +02:00
Simon McVittie
636a9a29f8
Merge branch 'dbus-1.4'
2011-07-01 14:54:42 +01:00
Jiří Klimeš
0dcb911251
DBusConnection: use DBUS_ERROR_OBJECT_PATH_IN_USE instead of DBUS_ERROR_ADDRESS_IN_USE
...
While registering an object path the possible error is
DBUS_ERROR_OBJECT_PATH_IN_USE, not DBUS_ERROR_ADDRESS_IN_USE (the error
is set by _dbus_object_tree_register()).
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38874
2011-07-01 14:48:48 +01:00
Simon McVittie
30f116fd2d
Include size of link cache in per-connection statistics
...
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34040
2011-06-24 16:01:56 +01:00
Simon McVittie
cf08dce402
Also record peak values for queued bytes/fds in connection stats
...
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34040
2011-06-24 16:01:56 +01:00
Simon McVittie
f69ac31dd9
Add an initial round of stats to the Stats interface
...
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34040
2011-06-24 16:01:56 +01:00
Simon McVittie
fce1f6b55f
DBusConnection, DBusTransport: add queue statistics
...
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34040
2011-06-24 16:01:46 +01:00
Simon McVittie
8a3e7581e7
BusConnections: add usage stats for well-known names, match rules
...
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34040
2011-06-24 16:01:06 +01:00
Simon McVittie
2351f57081
DBusList: add usage stats
...
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34040
2011-06-24 16:01:02 +01:00
Simon McVittie
82bc508785
DBusMemPool: add usage stats
...
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34040
2011-06-24 16:00:57 +01:00
Simon McVittie
206fff7ee6
Add a stub .Debug.Stats interface if --enable-stats
...
There are no actual statistics yet, just a count of how many times the
method has been called, and (for the per-connection stats) the unique name.
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34040
2011-06-24 16:00:49 +01:00
Simon McVittie
bc212b72b2
configure.ac: add --enable-stats
...
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34040
2011-06-24 16:00:43 +01:00
Simon McVittie
85e9a28303
match_rule_to_string: don't reinvent dbus_message_type_to_string
...
We don't allow match rules with unknown message types, so losing the
"type='%d'" case isn't a great loss.
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34040
2011-06-24 16:00:13 +01:00
Simon McVittie
16b9600964
Remove maximum length field from DBusString
...
The source code says it's "a historical artifact from a feature that
turned out to be dumb". Respond accordingly!
This reduces sizeof (DBusString) by 20% on ILP32 architectures, which
can't hurt. (No reduction on LP64 architectures that align pointers
naturally, unfortunately.)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38570
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-06-22 19:15:05 +01:00
Simon McVittie
e3b9a0597c
Remove unused _dbus_string_copy_data_len, _dbus_string_steal_data_len
...
They're only compiled when building tests.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38570
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-06-22 19:15:01 +01:00
Simon McVittie
c8a7417c73
Split DBUS_GENERIC_STRING_PREAMBLE into sensible lines
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38570
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-06-22 19:14:46 +01:00
Ralf Habacker
736445ee44
CMake fix: Do not use FORCE in variables which should be changeable by the user.
2011-06-20 09:29:12 +02:00
Ralf Habacker
aba867f242
fixed cmake error: doc says CACHE needs type *and* doc string
2011-06-14 18:45:46 +02:00
Simon McVittie
78bf46ae8c
Use epoll in a backwards-compatible way on Linux < 2.6.27
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
Bug-NB: NB#197191
Bug-NB: NB#225019
2011-06-13 17:30:47 +01:00
Simon McVittie
0110a3b13a
Maintain the set of polled sockets over time
...
This enables us to benefit from epoll(4): polling is now
O(number of watch changes + number of active fds), whereas with poll(2)
it's O(total number of fds).
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
Bug-NB: NB#197191
2011-06-13 17:30:45 +01:00
Simon McVittie
40b5dc824a
Add a stub _dbus_loop_toggle_watch and call it where needed
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
Bug-NB: NB#197191
2011-06-13 17:30:43 +01:00