Commit Graph

85 Commits

Author SHA1 Message Date
Marcel Holtmann
3a792ff3ce Add support for builtin GDBus security using PolicyKit 2010-09-09 18:30:43 +02:00
Marcel Holtmann
aafe340fa7 Add support for GDBus security action and flags 2010-09-09 18:30:43 +02:00
Marcel Holtmann
a7dc2305a8 Use simpler error callbacks for GDBus security hooks 2010-09-09 18:30:43 +02:00
Marcel Holtmann
c7aa1b025a Add support for GDBus security handlers 2010-09-09 18:30:43 +02:00
Luiz Augusto von Dentz
9acfec4459 Fix calling watch callbacks after it has been removed
Pending call should be removed if the watch is removed since the
application no longer expect that to be reached and may already freed the
data associated with it.
2010-09-07 23:41:20 +03:00
Luiz Augusto Von Dentz
a6dbffeb35 Fix signal watch when a service name is given
The bus name should be resolved when adding a watch by service name since
messages do always come with sender set to owner's bus name, also it
should listen to owner updates since it can change without invalidating
the watch.
2010-09-07 23:41:05 +03:00
Luiz Augusto Von Dentz
44f0cfce54 Do not automatically remove watches for service names
Services can be owned again so it is perfectly fine to keep the watch.
2010-09-07 23:41:00 +03:00
Marcel Holtmann
3a8efc07f5 Add printf format attribute for error creation helper 2010-08-19 19:36:01 +02:00
Zhenhua Zhang
9a06b941c5 gdbus: Fix memory leak of service_data
Avoid the memory leak of server_data after service_reply has been
called.
2010-07-26 12:30:31 +03:00
Johan Hedberg
800e8fa257 Fix parent path introspection data invalidation for multiple levels
In the case that parent path data needs to be invalidated we shouldn't
stop at the immediate parent if it doesn't have our own handler
registered but should continue upwards in the tree until we reach root
or our own handler.
2010-04-30 01:23:45 +03:00
Johan Hedberg
9bbcbff039 Fix memory leak in g_dbus_register_interface 2010-04-30 00:27:54 +03:00
Marcel Holtmann
d44989c514 Make interface callback tables const 2010-03-07 14:33:40 -08:00
Vinicius Costa Gomes
e6b83be22e Fix the case when the requested name is already in use
We weren't setting the dbus error in this situation.
2010-03-07 14:31:15 -08:00
Vinicius Costa Gomes
9839edb217 Fix: a pending call was leaking in check_service
This was triggering an assert inside libdbus when the timeout inside
the leaking pending call expired. The assert said that we were trying
to remove an nonexistent timeout.
2010-02-17 01:58:51 -08:00
Marcel Holtmann
dd99e73bd8 Remove unneeded use of status variable 2010-01-27 09:50:04 +01:00
Forrest Zhao
22d39c8860 Introduce g_dbus_setup_private() to gdbus
g_dbus_setup_private() is used to setup private DBusConnection
2010-01-27 09:50:04 +01:00
Luiz Augusto Von Dentz
d43ade97b2 Fix regression when removing watches
filter_data_find return the first data registered in this case so there is
no guarantee that it return the same data as passed to
filter_data_remove_callback which is the one that should be removed.

The fix is to simple cache the connection removing the correct data before
checking if there is any filter left.
2010-01-08 12:26:28 +02:00
Marcel Holtmann
4da121910a Cleanup of D-Bus mainloop integration 2010-01-02 21:42:49 -08:00
Marcel Holtmann
d21f53083c Update copyright information of D-Bus helper library 2010-01-01 17:04:13 -08:00
Luiz Augusto Von Dentz
d0b19b5cae Fix undefined symbols 2009-12-29 14:10:15 +02:00
Luiz Augusto Von Dentz
2ae4af4d42 Port gdbus to use g_dbus_add_signal_watch 2009-12-29 11:16:39 +02:00
Luiz Augusto Von Dentz
0b456960c0 Add initial implementation of g_dbus_add_signal_watch
With g_dbus_add_signal_watch there is no need to register multiple filters
for dbus nor add matching rules manually.
2009-12-29 10:53:21 +02:00
Daniel Orstadius
0b15d14b98 Fix D-Bus timeout handling
Timeouts should also be removed in the remove_timeout callback in
addition to the timeout_handler_free function. This is how dbus-glib
does it and it seems to prevent crashes in certain situations.
2009-12-17 07:35:40 +02:00
Claudio Takahasi
45806a9b07 Fix message handling for autostart.
Current implementation of libdbus Request name is blocking, consequently
the first incomming message that triggered the service autostart is not
being processed properly.
2009-10-29 15:40:08 +02:00
RISKÓ Gergely
b7ec8242e5 gdbus: handle introspection generally in generic_message.
Previously it was a specific case, now introspection is just another
interface, which is always implemented.  It is registered/unregistered
when an object path is referenced first/last.
2009-09-24 20:16:15 +03:00
RISKÓ Gergely
8f8cb865db Add introspection interface to the output of introspection calls
This provides better compatibility with some D-Bus clients, such as qdbus.
2009-09-14 18:25:13 +03:00
Marcel Holtmann
a5b1e3d02c Switch to a full non-recursive build system 2009-08-23 00:40:59 -07:00
Johan Hedberg
6c7c4ec6b0 Use NameHasOwner instead of ListNames for name checking 2009-08-08 20:22:40 +03:00
Marcel Holtmann
f19ee3a6dc Fix blocking service watch initial connect handling 2009-08-06 22:12:53 -07:00
Denis Kenzior
1f6936fe7c Make the parent path invalidateable 2009-05-11 11:50:18 -07:00
Luiz Augusto von Dentz
be02c289d9 Fix crash when calling g_dbus_remove_watch from inside the watch callback. 2009-05-06 17:15:27 -03:00
Luiz Augusto von Dentz
50686653da Fix g_dbus_remove_all_watches to remove all watches for the given connection. 2009-04-03 12:23:08 +03:00
Luiz Augusto von Dentz
9cf730b626 Fix gdbus watch function not handling multiple dbus connections.
gdbus was only adding a message filter for the very first connection given
by the user, this caused a bug in agent registration since it has a diffent
connection than previous watches it won't detect agent disappearing from the
bus.
2009-04-03 12:23:08 +03:00
Johan Hedberg
167546e0a2 Revert "Fix null dereference in gdbus/watch.c"
This reverts commit 2a96da99c7 so that gdbus
updates from obexd can be merged.
2009-04-03 12:22:44 +03:00
Gustavo F. Padovan
2a96da99c7 Fix null dereference in gdbus/watch.c
If name or data->name is null we have a null dereference. Not name and
data->name.
2009-04-01 08:50:38 +03:00
Marcel Holtmann
b8481a1eb4 Check that interface name is provided 2009-02-28 22:42:10 +01:00
Marcel Holtmann
fb333f1c88 Update copyright information 2009-01-01 19:33:20 +01:00
Raymond Liu
21f3750cf5 Check if path is valid before unregistering it 2008-12-24 07:15:50 +01:00
Marcel Holtmann
b75f83543a Fix issue with signed/unsigned comparison 2008-12-23 03:32:15 +01:00
Marcel Holtmann
1467329278 Use tabs for indentation 2008-12-20 21:51:39 +01:00
Marcel Holtmann
9fb751d212 Add missing gdbus function declarations 2008-12-06 15:45:28 +01:00
Marcel Holtmann
be0ba88ce4 Change file headers for D-Bus helper library 2008-12-06 15:40:08 +01:00
Marcel Holtmann
b892677f0b Don't expect reply when sending D-Bus messages 2008-11-26 14:33:21 +01:00
Marcel Holtmann
dfd3e56a3c Add function for checking if a service is present 2008-11-26 14:27:19 +01:00
Marcel Holtmann
132cd4ce64 Add g_dbus_add_service_watch() implementation 2008-10-17 19:18:51 +02:00
Marcel Holtmann
606e4a9280 Fix connection disconnect function 2008-10-17 18:33:11 +02:00
Marcel Holtmann
924541ea61 Change declaration of GDBusWatchFunction 2008-10-17 18:32:39 +02:00
Johan Hedberg
0b3d10c5ef Implement support g_dbus_create_error_valist 2008-09-11 14:33:31 +03:00
Marcel Holtmann
9db2625447 Remove g_dbus_unregister_all_interfaces function 2008-07-31 02:18:48 +02:00
Marcel Holtmann
24d6b3d375 Revert wrong listner id counter offset 2008-06-08 14:01:39 +00:00