Change-Id: I6ff93946990400a6e900d6d6916e2b68af92fbcc
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
static const char plugin_register_function_v1[] = "pluginAfbV1Register";
+void afb_api_so_set_timeout(int to)
+{
+ api_timeout = to;
+}
+
static int afb_api_so_event_broadcast(struct api_so_desc *desc, const char *name, struct json_object *object)
{
size_t length;
#pragma once
+extern void afb_api_so_set_timeout(int to);
+
extern int afb_api_so_add_plugin(const char *path);
extern int afb_api_so_add_directory(const char *path);
#define MAX_ALIAS 10 // max number of aliases
#define DEFLT_CNTX_TIMEOUT 3600 // default Client Connection Timeout
-#define DEFLT_API_TIMEOUT 0 // default Plugin API Timeout [0=NoLimit for Debug Only]
+#define DEFLT_API_TIMEOUT 20 // default Plugin API Timeout [0=NoLimit for Debug Only]
#define DEFLT_CACHE_TIMEOUT 100000 // default Static File Chache [Client Side Cache 100000~=1day]
#define DEFLT_AUTH_TOKEN NULL // expect for debug should == NULL
#define DEFLT_HTTP_TIMEOUT 15 // Max MibMicroHttp timeout
exit (1);
}
+ afb_api_so_set_timeout(config->apiTimeout);
if (config->ldpaths) {
if (afb_api_so_add_pathset(config->ldpaths) < 0) {
ERROR("initialisation of plugins within %s failed", config->ldpaths);