diff --git a/src/auth.c b/src/auth.c index eda1a34ffbcbf0c5e0c6ff46c59be94a14b2b6e1..9880468254c745799f69ce1ce45227fa430e9950 100644 --- a/src/auth.c +++ b/src/auth.c @@ -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; diff --git a/src/auth_static.c b/src/auth_static.c index 3b60422ab504418f3828dff96856176866f8c3f2..a27d4d8dcf75ea4be7d2c270d183c0c89d50ad80 100644 --- a/src/auth_static.c +++ b/src/auth_static.c @@ -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); } diff --git a/src/auth_url.c b/src/auth_url.c index c4b33fb186a532adb1956bc9d48ae35481afe7e2..b83c8db6cd9f319b09632cbd0ed1b307cd06d862 100644 --- a/src/auth_url.c +++ b/src/auth_url.c @@ -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); diff --git a/src/util.c b/src/util.c index fa50dd52bbd8a20cc1b38755c77922342f892fbf..8536831992b302c20e0fe74cecf5a6f2248ee988 100644 --- a/src/util.c +++ b/src/util.c @@ -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; diff --git a/src/util.h b/src/util.h index 973c27ca1a370b4cc7c6c26f9db02d22df4a5810..65ea074fa15f4052cfcf314ba28c8292d5504122 100644 --- a/src/util.h +++ b/src/util.h @@ -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__ */