Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Icecast-Server
Commits
edd3dcc6
Commit
edd3dcc6
authored
Jan 09, 2019
by
Philipp Schafft
🦁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update: Renamed replace_string() to util_replace_string()
parent
46d5e0e7
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
+17
-17
src/auth.c
src/auth.c
+1
-1
src/auth_static.c
src/auth_static.c
+1
-1
src/auth_url.c
src/auth_url.c
+13
-13
src/util.c
src/util.c
+1
-1
src/util.h
src/util.h
+1
-1
No files found.
src/auth.c
View file @
edd3dcc6
...
@@ -985,7 +985,7 @@ int auth_alter_client(auth_t *auth, auth_client *auth_user, auth_alter_t action,
...
@@ -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
)
if
(
auth
->
permission_alter
[
action
]
!=
AUTH_MATCHTYPE_MATCH
)
return
-
1
;
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
;
return
-
1
;
auth_user
->
alter_client_action
=
action
;
auth_user
->
alter_client_action
=
action
;
...
...
src/auth_static.c
View file @
edd3dcc6
...
@@ -126,7 +126,7 @@ int auth_get_static_auth (auth_t *authenticator, config_options_t *options)
...
@@ -126,7 +126,7 @@ int auth_get_static_auth (auth_t *authenticator, config_options_t *options)
return
-
1
;
return
-
1
;
}
}
}
else
if
(
strcmp
(
options
->
name
,
"argument"
)
==
0
)
{
}
else
if
(
strcmp
(
options
->
name
,
"argument"
)
==
0
)
{
replace_string
(
&
(
auth_info
->
arg
),
options
->
value
);
util_
replace_string
(
&
(
auth_info
->
arg
),
options
->
value
);
}
else
{
}
else
{
ICECAST_LOG_ERROR
(
"Unknown option: %s"
,
options
->
name
);
ICECAST_LOG_ERROR
(
"Unknown option: %s"
,
options
->
name
);
}
}
...
...
src/auth_url.c
View file @
edd3dcc6
...
@@ -632,40 +632,40 @@ int auth_get_url_auth(auth_t *authenticator, config_options_t *options)
...
@@ -632,40 +632,40 @@ int auth_get_url_auth(auth_t *authenticator, config_options_t *options)
while
(
options
)
{
while
(
options
)
{
if
(
strcmp
(
options
->
name
,
"username"
)
==
0
)
{
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
)
{
}
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
)
{
}
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
)
{
}
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
)
{
}
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
)
{
}
else
if
(
strcmp
(
options
->
name
,
"client_remove"
)
==
0
)
{
authenticator
->
release_client
=
url_remove_client
;
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
)
{
}
else
if
(
strcmp
(
options
->
name
,
"action_add"
)
==
0
)
{
addaction
=
options
->
value
;
addaction
=
options
->
value
;
}
else
if
(
strcmp
(
options
->
name
,
"action_remove"
)
==
0
)
{
}
else
if
(
strcmp
(
options
->
name
,
"action_remove"
)
==
0
)
{
removeaction
=
options
->
value
;
removeaction
=
options
->
value
;
}
else
if
(
strcmp
(
options
->
name
,
"auth_header"
)
==
0
)
{
}
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
)
{
}
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
)
{
}
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
);
util_strtolower
(
url_info
->
header_message
);
}
else
if
(
strcmp
(
options
->
name
,
"header_timelimit"
)
==
0
)
{
}
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
);
util_strtolower
(
url_info
->
header_message
);
}
else
if
(
strcmp
(
options
->
name
,
"header_message"
)
==
0
)
{
}
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
);
util_strtolower
(
url_info
->
header_message
);
}
else
if
(
strcmp
(
options
->
name
,
"header_alter_action"
)
==
0
)
{
}
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
);
util_strtolower
(
url_info
->
header_alter_action
);
}
else
if
(
strcmp
(
options
->
name
,
"header_alter_argument"
)
==
0
)
{
}
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
);
util_strtolower
(
url_info
->
header_alter_argument
);
}
else
{
}
else
{
ICECAST_LOG_ERROR
(
"Unknown option: %s"
,
options
->
name
);
ICECAST_LOG_ERROR
(
"Unknown option: %s"
,
options
->
name
);
...
...
src/util.c
View file @
edd3dcc6
...
@@ -1490,7 +1490,7 @@ int get_line(FILE *file, char *buf, size_t siz)
...
@@ -1490,7 +1490,7 @@ int get_line(FILE *file, char *buf, size_t siz)
return
0
;
return
0
;
}
}
int
replace_string
(
char
**
dst
,
const
char
*
src
)
int
util_
replace_string
(
char
**
dst
,
const
char
*
src
)
{
{
char
*
n
;
char
*
n
;
...
...
src/util.h
View file @
edd3dcc6
...
@@ -129,6 +129,6 @@ char *util_conv_string (const char *string, const char *in_charset, const char *
...
@@ -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
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
);
int
util_strtolower
(
char
*
str
);
#endif
/* __UTIL_H__ */
#endif
/* __UTIL_H__ */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment