summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/session.h1
-rw-r--r--src/session.c9
2 files changed, 9 insertions, 1 deletions
diff --git a/include/session.h b/include/session.h
index f75b7516..c56c73ba 100644
--- a/include/session.h
+++ b/include/session.h
@@ -76,6 +76,7 @@ int connman_session_policy_register(struct connman_session_policy *config);
void connman_session_policy_unregister(struct connman_session_policy *config);
int connman_session_config_update(struct connman_session *session);
+void connman_session_destroy(struct connman_session *session);
struct connman_session_config *connman_session_create_default_config(void);
diff --git a/src/session.c b/src/session.c
index 68e35626..1287d198 100644
--- a/src/session.c
+++ b/src/session.c
@@ -1814,6 +1814,13 @@ err:
return err;
}
+void connman_session_destroy(struct connman_session *session)
+{
+ DBG("session %p", session);
+
+ session_disconnect(session);
+}
+
int __connman_session_destroy(DBusMessage *msg)
{
const char *owner, *session_path;
@@ -1835,7 +1842,7 @@ int __connman_session_destroy(DBusMessage *msg)
if (g_strcmp0(owner, session->owner) != 0)
return -EACCES;
- session_disconnect(session);
+ connman_session_destroy(session);
return 0;
}