summaryrefslogtreecommitdiffstats
path: root/src/afb-session.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-02-12 10:27:59 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2018-02-13 09:20:24 +0100
commitf6a6c26058c8b6ca7500c84ffe13ca2b2dc8b49e (patch)
tree6588e1e339b19dab11d731bf170313cfc812869d /src/afb-session.c
parent400331c1921a1e8388551b4221b8cb835c06cf21 (diff)
test-session: Add check of hooking
Change-Id: I3ac86b41537651e360e7ea21ad425f2e1bffb852 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-session.c')
-rw-r--r--src/afb-session.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/afb-session.c b/src/afb-session.c
index dfa383b1..c23d414b 100644
--- a/src/afb-session.c
+++ b/src/afb-session.c
@@ -428,7 +428,6 @@ end:
struct afb_session *afb_session_addref(struct afb_session *session)
{
if (session != NULL) {
- afb_hook_session_unref(session);
afb_hook_session_addref(session);
session->refcount++;
session_unlock(session);
@@ -444,7 +443,7 @@ void afb_session_unref(struct afb_session *session)
session_lock(session);
afb_hook_session_unref(session);
- if (!--session->refcount) {
+ if (--session->refcount) {
if (session->autoclose)
session_close(session);
if (session->notinset) {