summaryrefslogtreecommitdiff
path: root/droute
diff options
context:
space:
mode:
authorMike Gorse <mgorse@novell.com>2011-08-15 14:22:02 -0500
committerMike Gorse <mgorse@novell.com>2011-08-15 14:22:02 -0500
commita1a316d1ef4167dbca147bc3477ed22305c83743 (patch)
tree1cc5075eba5489aeb0b04d15515c2c13d8697c1d /droute
parent8c08a7600a39a10e5d1e6dc0c22a5ae196bce823 (diff)
downloadat-spi2-atk-a1a316d1ef4167dbca147bc3477ed22305c83743.tar.gz
Fixed some problems when shutting down and restarting the module
If gnome_accessibility_module_shutdown was called and followed by a call to gnome_accessibility_module_init, then things would go awry because of various resources not being freed. Fixed several of these issues, although some issues might remain.
Diffstat (limited to 'droute')
-rw-r--r--droute/droute.c27
-rw-r--r--droute/droute.h9
2 files changed, 36 insertions, 0 deletions
diff --git a/droute/droute.c b/droute/droute.c
index 20c262f..9212e4d 100644
--- a/droute/droute.c
+++ b/droute/droute.c
@@ -686,6 +686,12 @@ droute_path_register (DRoutePath *path, DBusConnection *bus)
}
void
+droute_path_unregister (DRoutePath *path, DBusConnection *bus)
+{
+ dbus_connection_unregister_object_path (bus, path->path);
+}
+
+void
droute_context_register (DRouteContext *cnx, DBusConnection *bus)
{
g_ptr_array_foreach (cnx->registered_paths, (GFunc) droute_path_register,
@@ -693,9 +699,30 @@ droute_context_register (DRouteContext *cnx, DBusConnection *bus)
}
void
+droute_context_unregister (DRouteContext *cnx, DBusConnection *bus)
+{
+ g_ptr_array_foreach (cnx->registered_paths, (GFunc) droute_path_unregister,
+ bus);
+}
+
+void
+droute_context_deregister (DRouteContext *cnx, DBusConnection *bus)
+{
+ g_ptr_array_foreach (cnx->registered_paths, (GFunc) droute_path_unregister,
+ bus);
+}
+
+void
droute_intercept_dbus (DBusConnection *bus)
{
dbus_connection_register_object_path (bus, DBUS_PATH_DBUS,
&droute_vtable, NULL);
}
+
+void
+droute_unintercept_dbus (DBusConnection *bus)
+{
+ dbus_connection_unregister_object_path (bus, DBUS_PATH_DBUS);
+}
+
/*END------------------------------------------------------------------------*/
diff --git a/droute/droute.h b/droute/droute.h
index 766340e..b19dec6 100644
--- a/droute/droute.h
+++ b/droute/droute.h
@@ -97,8 +97,17 @@ void
droute_path_register (DRoutePath *path, DBusConnection *bus);
void
+droute_path_unregister (DRoutePath *path, DBusConnection *bus);
+
+void
droute_context_register (DRouteContext *cnx, DBusConnection *bus);
void
+droute_context_unregister (DRouteContext *cnx, DBusConnection *bus);
+
+void
droute_intercept_dbus (DBusConnection *connection);
+
+void
+droute_unintercept_dbus (DBusConnection *connection);
#endif /* _DROUTE_H */