static void __on_name_lost(GDBusConnection *conn, const gchar *name, gpointer user_data)
{
_E("Dbus name lost");
- raise(SIGTERM);
}
conv::DbusServer::DbusServer()
conv::DbusServer::~DbusServer()
{
- release();
}
bool conv::DbusServer::init()
void conv::DbusServer::release()
{
- if (dbusConnection)
+ if (dbusConnection) {
g_dbus_connection_flush_sync(dbusConnection, NULL, NULL);
+ dbusConnection = NULL;
+ }
if (dbusOwnerId > 0) {
g_bus_unown_name(dbusOwnerId);
dbusOwnerId = 0;
}
- if (dbusConnection) {
- g_dbus_connection_close_sync(dbusConnection, NULL, NULL);
- g_object_unref(dbusConnection);
- dbusConnection = NULL;
- }
-
if (dbusNodeInfo) {
g_dbus_node_info_unref(dbusNodeInfo);
dbusNodeInfo = NULL;