iov[4].iov_base = (void*)&chars[9];
iov[4].iov_len = 1;
- writev(2, iov, 5);
+ (void)writev(2, iov, 5);
free(mem1);
free(mem2);
_hook_api_(export, "on_event_handler[%s].after(%s, %d, %s)", pattern, event, event_x2, json_object_to_json_string_ext(object, JSON_C_TO_STRING_NOSLASHESCAPE));
}
+static void hook_api_settings_cb(void *closure, const struct afb_hookid *hookid, const struct afb_export *export, struct json_object *object)
+{
+ _hook_api_(export, "settings -> %s", json_object_to_json_string_ext(object, JSON_C_TO_STRING_NOSLASHESCAPE));
+}
+
static struct afb_hook_api_itf hook_api_default_itf = {
.hook_api_event_broadcast_before = hook_api_event_broadcast_before_cb,
.hook_api_event_broadcast_after = hook_api_event_broadcast_after_cb,
.hook_api_delete_api = hook_api_delete_api_cb,
.hook_api_on_event_handler_before = hook_api_on_event_handler_before_cb,
.hook_api_on_event_handler_after = hook_api_on_event_handler_after_cb,
+ .hook_api_settings = hook_api_settings_cb,
};
/******************************************************************************
_HOOK_API_2_(on_event_handler, on_event_handler_after, export, event, event_x2, object, pattern);
}
+struct json_object *afb_hook_api_settings(const struct afb_export *export, struct json_object *object)
+{
+ _HOOK_API_(settings, export, object);
+ return object;
+}
+
/******************************************************************************
* section: hooking export
*****************************************************************************/