1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

Update: Renamed replace_string() to util_replace_string()

This commit is contained in:
Philipp Schafft 2019-01-09 09:18:50 +00:00
parent 46d5e0e703
commit edd3dcc60d
5 changed files with 17 additions and 17 deletions

View File

@ -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;

View File

@ -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);
}

View File

@ -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);

View File

@ -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;

View File

@ -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__ */