diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-07-31 17:50:13 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-08-08 11:55:36 +0200 |
commit | 4ecf37c1899349e6ef7ac08813ebb52fc80b2677 (patch) | |
tree | 88d6b940fc8e6f296ac2a93dfab32bba1711418d /src/afb-session.c | |
parent | 330edf6a1ec91fa5a9829d6450fa4fff0b91c693 (diff) |
afb-trace: Add tracing features to API monitor
This api allows to receive events when particular actions
are reached.
At the moment, tracing is bound to the API monitor
and can trace anything. In the future, this will not be
the case and the API monitor will only allow to trace
requests of its session. The tracing of all will
be available for supervision only.
Change-Id: I880852612c2f77ff5329496b16c75fe602db4090
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-session.c')
-rw-r--r-- | src/afb-session.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/afb-session.c b/src/afb-session.c index 536cdbcc..7c8f91c4 100644 --- a/src/afb-session.c +++ b/src/afb-session.c @@ -309,6 +309,8 @@ struct afb_session *afb_session_get (const char *uuid, int *created) /* search for an existing one not too old */ if (uuid != NULL) { session = search(uuid); + if (!created) + return session; if (session != NULL) { *created = 0; session->access = now; @@ -317,7 +319,9 @@ struct afb_session *afb_session_get (const char *uuid, int *created) } } - *created = 1; + if (created) + *created = 1; + return make_session(uuid, sessions.timeout, now); } |