Commit edd3dcc6 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Update: Renamed replace_string() to util_replace_string()

parent 46d5e0e7
......@@ -985,7 +985,7 @@ int auth_alter_client(auth_t *auth, auth_client *auth_user, auth_alter_t action,
if (auth->permission_alter[action] != AUTH_MATCHTYPE_MATCH)
return -1;
if (replace_string(&(auth_user->alter_client_arg), arg) != 0)
if (util_replace_string(&(auth_user->alter_client_arg), arg) != 0)
return -1;
auth_user->alter_client_action = action;
......
......@@ -126,7 +126,7 @@ int auth_get_static_auth (auth_t *authenticator, config_options_t *options)
return -1;
}
} else if (strcmp(options->name, "argument") == 0) {
replace_string(&(auth_info->arg), options->value);
util_replace_string(&(auth_info->arg), options->value);
} else {
ICECAST_LOG_ERROR("Unknown option: %s", options->name);
}
......
......@@ -632,40 +632,40 @@ int auth_get_url_auth(auth_t *authenticator, config_options_t *options)
while(options) {
if(strcmp(options->name, "username") == 0) {
replace_string(&(url_info->username), options->value);
util_replace_string(&(url_info->username), options->value);
} else if(strcmp(options->name, "password") == 0) {
replace_string(&(url_info->password), options->value);
util_replace_string(&(url_info->password), options->value);
} else if(strcmp(options->name, "headers") == 0) {
replace_string(&(url_info->pass_headers), options->value);
util_replace_string(&(url_info->pass_headers), options->value);
} else if(strcmp(options->name, "header_prefix") == 0) {
replace_string(&(url_info->prefix_headers), options->value);
util_replace_string(&(url_info->prefix_headers), options->value);
} else if(strcmp(options->name, "client_add") == 0) {
replace_string(&(url_info->addurl), options->value);
util_replace_string(&(url_info->addurl), options->value);
} else if(strcmp(options->name, "client_remove") == 0) {
authenticator->release_client = url_remove_client;
replace_string(&(url_info->removeurl), options->value);
util_replace_string(&(url_info->removeurl), options->value);
} else if(strcmp(options->name, "action_add") == 0) {
addaction = options->value;
} else if(strcmp(options->name, "action_remove") == 0) {
removeaction = options->value;
} else if(strcmp(options->name, "auth_header") == 0) {
replace_string(&(url_info->auth_header), options->value);
util_replace_string(&(url_info->auth_header), options->value);
} else if (strcmp(options->name, "timelimit_header") == 0) {
replace_string(&(url_info->timelimit_header), options->value);
util_replace_string(&(url_info->timelimit_header), options->value);
} else if (strcmp(options->name, "header_auth") == 0) {
replace_string(&(url_info->header_auth), options->value);
util_replace_string(&(url_info->header_auth), options->value);
util_strtolower(url_info->header_message);
} else if (strcmp(options->name, "header_timelimit") == 0) {
replace_string(&(url_info->header_timelimit), options->value);
util_replace_string(&(url_info->header_timelimit), options->value);
util_strtolower(url_info->header_message);
} else if (strcmp(options->name, "header_message") == 0) {
replace_string(&(url_info->header_message), options->value);
util_replace_string(&(url_info->header_message), options->value);
util_strtolower(url_info->header_message);
} else if (strcmp(options->name, "header_alter_action") == 0) {
replace_string(&(url_info->header_alter_action), options->value);
util_replace_string(&(url_info->header_alter_action), options->value);
util_strtolower(url_info->header_alter_action);
} else if (strcmp(options->name, "header_alter_argument") == 0) {
replace_string(&(url_info->header_alter_argument), options->value);
util_replace_string(&(url_info->header_alter_argument), options->value);
util_strtolower(url_info->header_alter_argument);
} else {
ICECAST_LOG_ERROR("Unknown option: %s", options->name);
......
......@@ -1490,7 +1490,7 @@ int get_line(FILE *file, char *buf, size_t siz)
return 0;
}
int replace_string(char **dst, const char *src)
int util_replace_string(char **dst, const char *src)
{
char *n;
......
......@@ -129,6 +129,6 @@ char *util_conv_string (const char *string, const char *in_charset, const char *
int get_line(FILE *file, char *buf, size_t siz);
int replace_string(char **dst, const char *src);
int util_replace_string(char **dst, const char *src);
int util_strtolower(char *str);
#endif /* __UTIL_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment