Bug fix on Engine Configurable
This patch fixes a couple of issue within audio policy engine configurable
-valgrind error detected within the parsing of the configuration file
-configuration file typos
-start of the PFW delayed to the init in order to wait the full construction
of the engine object
-wrong specialization of template functions.
-broadcast volume min / max init to stream collection of manager & PFW
Change-Id: I08823ab4040c92b719747c60cc3fa5c8b5f172ac
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
diff --git a/services/audiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp b/services/audiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp
index 5b935e8..cfe49d4 100755
--- a/services/audiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp
+++ b/services/audiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp
@@ -145,7 +145,7 @@
ALOG_ASSERT(node != NULL, "error in parsing file");
const char *typeName = node->name;
- char *valueNames = (char *)node->value;
+ char *valueNames = strndup(node->value, strlen(node->value));
addCriterionType(typeName, isInclusive);
@@ -178,6 +178,7 @@
}
valueName = strtok_r(NULL, ",", &ctx);
}
+ free(valueNames);
}
}