summaryrefslogtreecommitdiffstats
path: root/4a-hal
diff options
context:
space:
mode:
Diffstat (limited to '4a-hal')
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
index d2ae7d4..312959e 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
@@ -42,7 +42,7 @@ AFB_ApiT AFB_default;
******************************************************************************/
// Config Section definition
-static CtlSectionT ctrlSections[] =
+static CtlSectionT ctrlSectionsDefault[] =
{
{ .key = "resources", .loadCB = PluginConfig },
{ .key = "halmixer", .loadCB = HalCtlsHalMixerConfig },
@@ -121,6 +121,7 @@ static int HalCtlsLoadOneApi(void *cbdata, AFB_ApiT apiHandle)
{
int err;
CtlConfigT *ctrlConfig;
+ CtlSectionT *ctrlCurrentSections;
if(! cbdata || ! apiHandle)
return -1;
@@ -136,8 +137,11 @@ static int HalCtlsLoadOneApi(void *cbdata, AFB_ApiT apiHandle)
return 1;
}
+ ctrlCurrentSections = malloc(sizeof(ctrlSectionsDefault));
+ memcpy(ctrlCurrentSections, ctrlSectionsDefault, sizeof(ctrlSectionsDefault));
+
// Load section for corresponding Api
- if((err = CtlLoadSections(apiHandle, ctrlConfig, ctrlSections)))
+ if((err = CtlLoadSections(apiHandle, ctrlConfig, ctrlCurrentSections)))
return err;
// Declare an event manager for this Api
a id='n169' href='#n169'>169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221