Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Remove returning token
[src/app-framework-binder.git]
/
src
/
afb-trace.c
diff --git
a/src/afb-trace.c
b/src/afb-trace.c
index
ffb0305
..
5f8ec64
100644
(file)
--- a/
src/afb-trace.c
+++ b/
src/afb-trace.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2016
, 2017, 2018
"IoT.bzh"
+ * Copyright (C) 2016
-2019
"IoT.bzh"
* Author José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Author José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@
-15,6
+15,8
@@
* limitations under the License.
*/
* limitations under the License.
*/
+#if WITH_AFB_HOOK && WITH_AFB_TRACE
+
#define _GNU_SOURCE
#include <assert.h>
#define _GNU_SOURCE
#include <assert.h>
@@
-65,7
+67,7
@@
/* struct for tags */
struct tag {
struct tag *next; /* link to the next */
/* struct for tags */
struct tag {
struct tag *next; /* link to the next */
- char tag[
1];
/* name of the tag */
+ char tag[
];
/* name of the tag */
};
/* struct for events */
};
/* struct for events */
@@
-851,7
+853,7
@@
static void hook_session(void *closure, const struct afb_hookid *hookid, struct
static void hook_session_create(void *closure, const struct afb_hookid *hookid, struct afb_session *session)
{
static void hook_session_create(void *closure, const struct afb_hookid *hookid, struct afb_session *session)
{
- hook_session(closure, hookid, session, "create",
"{ss}", "token", afb_session_token(session)
);
+ hook_session(closure, hookid, session, "create",
NULL
);
}
static void hook_session_close(void *closure, const struct afb_hookid *hookid, struct afb_session *session)
}
static void hook_session_close(void *closure, const struct afb_hookid *hookid, struct afb_session *session)
@@
-864,11
+866,6
@@
static void hook_session_destroy(void *closure, const struct afb_hookid *hookid,
hook_session(closure, hookid, session, "destroy", NULL);
}
hook_session(closure, hookid, session, "destroy", NULL);
}
-static void hook_session_renew(void *closure, const struct afb_hookid *hookid, struct afb_session *session)
-{
- hook_session(closure, hookid, session, "renew", "{ss}", "token", afb_session_token(session));
-}
-
static void hook_session_addref(void *closure, const struct afb_hookid *hookid, struct afb_session *session)
{
hook_session(closure, hookid, session, "addref", NULL);
static void hook_session_addref(void *closure, const struct afb_hookid *hookid, struct afb_session *session)
{
hook_session(closure, hookid, session, "addref", NULL);
@@
-883,7
+880,6
@@
static struct afb_hook_session_itf hook_session_itf = {
.hook_session_create = hook_session_create,
.hook_session_close = hook_session_close,
.hook_session_destroy = hook_session_destroy,
.hook_session_create = hook_session_create,
.hook_session_close = hook_session_close,
.hook_session_destroy = hook_session_destroy,
- .hook_session_renew = hook_session_renew,
.hook_session_addref = hook_session_addref,
.hook_session_unref = hook_session_unref
};
.hook_session_addref = hook_session_addref,
.hook_session_unref = hook_session_unref
};
@@
-1071,7
+1067,7
@@
static struct tag *trace_get_tag(struct afb_trace *trace, const char *name, int
if (!tag && alloc) {
/* creation if needed */
if (!tag && alloc) {
/* creation if needed */
- tag = malloc(sizeof * tag + strlen(name));
+ tag = malloc(sizeof * tag +
1 +
strlen(name));
if (tag) {
strcpy(tag->tag, name);
tag->next = trace->tags;
if (tag) {
strcpy(tag->tag, name);
tag->next = trace->tags;
@@
-1605,3
+1601,5
@@
int afb_trace_drop(afb_req_t req, struct json_object *args, struct afb_trace *tr
free(context.errors);
return -1;
}
free(context.errors);
return -1;
}
+
+#endif