summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
464fcac)
Change-Id: Ic1595a9438f5af6872dc030db949223477b3f238
Signed-off-by: Radoslaw Jablonski <radoslawx.jablonski@intel.com>
/* Validates config option that may take multiple strings arguments.
* Returns 0 on success, -1 otherwise */
static int check_config_multiple_string_entry(const oconfig_item_t *ci) {
/* Validates config option that may take multiple strings arguments.
* Returns 0 on success, -1 otherwise */
static int check_config_multiple_string_entry(const oconfig_item_t *ci) {
+ if (ci == NULL) {
+ ERROR(PLUGIN_NAME " plugin: ci oconfig_item can't be NULL");
+ return -1;
+ }
+
if (ci->values_num < 1) {
ERROR(PLUGIN_NAME
" plugin: the '%s' option requires at least one string argument",
if (ci->values_num < 1) {
ERROR(PLUGIN_NAME
" plugin: the '%s' option requires at least one string argument",
continue;
} else if (strcasecmp(c->key, "HostnameFormat") == 0) {
/* this option can take multiple strings arguments in one config line*/
continue;
} else if (strcasecmp(c->key, "HostnameFormat") == 0) {
/* this option can take multiple strings arguments in one config line*/
- if (check_config_multiple_string_entry(c) != 0)
+ if (check_config_multiple_string_entry(c) != 0) {
+ ERROR(PLUGIN_NAME " plugin: Could not get 'HostnameFormat' parameter");
const int params_num = c->values_num;
for (int i = 0; i < params_num; ++i) {
const int params_num = c->values_num;
for (int i = 0; i < params_num; ++i) {
continue;
} else if (strcasecmp(c->key, "PluginInstanceFormat") == 0) {
/* this option can handle list of string parameters in one line*/
continue;
} else if (strcasecmp(c->key, "PluginInstanceFormat") == 0) {
/* this option can handle list of string parameters in one line*/
- if (check_config_multiple_string_entry(c) != 0)
+ if (check_config_multiple_string_entry(c) != 0) {
+ ERROR(PLUGIN_NAME
+ " plugin: Could not get 'PluginInstanceFormat' parameter");
const int params_num = c->values_num;
for (int i = 0; i < params_num; ++i) {
const int params_num = c->values_num;
for (int i = 0; i < params_num; ++i) {