diff options
Diffstat (limited to 'obexd')
-rw-r--r-- | obexd/client/session.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/obexd/client/session.c b/obexd/client/session.c index 632e114b5..331d23d15 100644 --- a/obexd/client/session.c +++ b/obexd/client/session.c @@ -258,6 +258,12 @@ void obc_session_unref(struct obc_session *session) if (refs > 0) return; + /* Disconnect transport */ + if (session->id > 0 && session->transport != NULL) { + session->transport->disconnect(session->id); + session->id = 0; + } + session_free(session); } @@ -555,12 +561,6 @@ void obc_session_shutdown(struct obc_session *session) if (session->path) session_unregistered(session); - /* Disconnect transport */ - if (session->id > 0 && session->transport != NULL) { - session->transport->disconnect(session->id); - session->id = 0; - } - obc_session_unref(session); } |