From edd3dcc60db74298f84e1d9d19318edac2f1703f Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Wed, 9 Jan 2019 09:18:50 +0000 Subject: [PATCH] Update: Renamed replace_string() to util_replace_string() --- src/auth.c | 2 +- src/auth_static.c | 2 +- src/auth_url.c | 26 +++++++++++++------------- src/util.c | 2 +- src/util.h | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/auth.c b/src/auth.c index eda1a34f..98804682 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 3b60422a..a27d4d8d 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 c4b33fb1..b83c8db6 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 fa50dd52..85368319 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 973c27ca..65ea074f 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__ */