help | logout
RSP_getConfigValue

RSP_getConfigValue

Name

RSP_getConfigValue -- Gets the first piece of data associated with the given name.

Synopsis

const char* RSP_getConfigValue(RSP_moduleBackend *mod, char *name);

Description

Values are associated with variable names in the config block of the RSPD configuration file. Multiple values may be associated with a name (generally signifying an array), or just one. This function returns the first piece of data associated with a given name (NULL if no element with such a name exists). This function would be used for elements which should be scalars (one value for one name). Even if the user sets it multiple times, only the first value is returned.

Returns

A null-terminated string containing the value, or NULL if no such name exists.

Error Conditions

If an error occurred, this function will return NULL and set rsp_error to the following error code:

  • RSP_NO_CONFIG_FOUND

  • RSP_INVALID_ARGS