Kill connection in context service

This commit is contained in:
Dorota Czaplejewicz
2019-06-22 15:31:08 +00:00
parent 5a6386dd24
commit f1fbb37547
4 changed files with 3 additions and 110 deletions

View File

@ -492,12 +492,10 @@ server_context_service_init (ServerContextService *context)
ServerContextService *
server_context_service_new (const gchar *client_name,
const gchar *object_path,
GDBusConnection *connection)
const gchar *object_path)
{
return g_object_new (SERVER_TYPE_CONTEXT_SERVICE,
"client-name", client_name,
"object-path", object_path,
"connection", connection,
NULL);
}

View File

@ -32,8 +32,7 @@ G_BEGIN_DECLS
typedef struct _ServerContextService ServerContextService;
ServerContextService *server_context_service_new (const gchar *client_name,
const gchar *object_path,
GDBusConnection *connection);
const gchar *object_path);
G_END_DECLS
#endif /* SERVER_CONTEXT_SERVICE_H */

View File

@ -42,9 +42,7 @@ server_service_real_create_context (EekboardService *self,
GDBusConnection *connection;
ServerContextService *context;
g_object_get (G_OBJECT(self), "connection", &connection, NULL);
context = server_context_service_new (client_name, object_path, connection);
g_object_unref (connection);
context = server_context_service_new (client_name, object_path);
return EEKBOARD_CONTEXT_SERVICE(context);
}