summaryrefslogtreecommitdiffstats
path: root/Controller-afb/ctl-dispatch.c
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-08-20 17:16:28 +0200
committerFulup Ar Foll <fulup@iot.bzh>2017-08-20 17:16:28 +0200
commitd51d083be8e34000cd00ce979445eacb45a16e97 (patch)
treef049458d72b7c6ebe7bea10770f48db1adfc0646 /Controller-afb/ctl-dispatch.c
parentc58b7ea33694ab8c76f8cb452d3b8928eb3279ad (diff)
Updated to latest App Template
Diffstat (limited to 'Controller-afb/ctl-dispatch.c')
-rw-r--r--Controller-afb/ctl-dispatch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Controller-afb/ctl-dispatch.c b/Controller-afb/ctl-dispatch.c
index 1708204..0104229 100644
--- a/Controller-afb/ctl-dispatch.c
+++ b/Controller-afb/ctl-dispatch.c
@@ -178,6 +178,8 @@ PUBLIC void DispatchOneEvent(const char *evtLabel, json_object *eventJ) {
// Event name is mapped on control label and executed as a standard control
PUBLIC int DispatchOnLoad(const char *onLoadLabel) {
+ if (!configHandle) return 1;
+
DispatchHandleT **onloads = configHandle->onloads;
int err = DispatchOneControl(CTL_SOURCE_ONLOAD, onloads, onLoadLabel, NULL, NULL_AFBREQ);
@@ -650,7 +652,7 @@ PUBLIC int DispatchInit() {
// no dispatch config found remove control API from binder
if (!luaLoaded) {
- AFB_WARNING("DISPATCH-INIT:WARNING Not Found Control dispatch file [%s]", controlFile);
+ AFB_WARNING("DISPATCH-INIT:WARNING (setenv CONTROL_CONFIG_PATH) No Config '%s-*.json' in '%s'", controlFile, dirList);
}
AFB_NOTICE("DISPATCH-INIT:SUCCES: Audio Control Dispatch Init");