Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Icecast-Server
Commits
34b10657
Commit
34b10657
authored
Jun 17, 2018
by
Philipp Schafft
🦁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup: Make use of "icecasttypes.h"
parent
e467f6e3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
15 deletions
+16
-15
src/auth.h
src/auth.h
+5
-5
src/client.h
src/client.h
+4
-4
src/slave.h
src/slave.h
+2
-1
src/util.c
src/util.c
+1
-1
src/util.h
src/util.h
+4
-4
No files found.
src/auth.h
View file @
34b10657
...
...
@@ -56,7 +56,7 @@ typedef enum
typedef
struct
auth_client_tag
{
client_t
*
client
;
auth_result
(
*
process
)(
struct
auth_t
ag
*
auth
,
struct
auth_client_tag
*
auth_user
);
auth_result
(
*
process
)(
auth_t
*
auth
,
struct
auth_client_tag
*
auth_user
);
void
(
*
on_no_match
)(
client_t
*
client
,
void
(
*
on_result
)(
client_t
*
client
,
void
*
userdata
,
auth_result
result
),
void
*
userdata
);
void
(
*
on_result
)(
client_t
*
client
,
void
*
userdata
,
auth_result
result
);
void
*
userdata
;
...
...
@@ -87,11 +87,11 @@ struct auth_tag
auth_result
(
*
release_client
)(
auth_client
*
auth_user
);
/* auth state-specific free call */
void
(
*
free
)(
struct
auth_t
ag
*
self
);
void
(
*
free
)(
auth_t
*
self
);
auth_result
(
*
adduser
)(
struct
auth_t
ag
*
auth
,
const
char
*
username
,
const
char
*
password
);
auth_result
(
*
deleteuser
)(
struct
auth_t
ag
*
auth
,
const
char
*
username
);
auth_result
(
*
listuser
)(
struct
auth_t
ag
*
auth
,
xmlNodePtr
srcnode
);
auth_result
(
*
adduser
)(
auth_t
*
auth
,
const
char
*
username
,
const
char
*
password
);
auth_result
(
*
deleteuser
)(
auth_t
*
auth
,
const
char
*
username
);
auth_result
(
*
listuser
)(
auth_t
*
auth
,
xmlNodePtr
srcnode
);
mutex_t
lock
;
int
running
;
...
...
src/client.h
View file @
34b10657
...
...
@@ -95,19 +95,19 @@ struct _client_tag {
unsigned
int
pos
;
/* auth used for this client */
struct
auth_t
ag
*
auth
;
auth_t
*
auth
;
/* Format-handler-specific data for this client */
void
*
format_data
;
/* function to call to release format specific resources */
void
(
*
free_client_data
)(
struct
_
client_t
ag
*
client
);
void
(
*
free_client_data
)(
client_t
*
client
);
/* write out data associated with client */
int
(
*
write_to_client
)(
struct
_
client_t
ag
*
client
);
int
(
*
write_to_client
)(
client_t
*
client
);
/* function to check if refbuf needs updating */
int
(
*
check_buffer
)(
struct
source_t
ag
*
source
,
struct
_
client_t
ag
*
client
);
int
(
*
check_buffer
)(
source_t
*
source
,
client_t
*
client
);
};
int
client_create
(
client_t
**
c_ptr
,
connection_t
*
con
,
http_parser_t
*
parser
);
...
...
src/slave.h
View file @
34b10657
...
...
@@ -14,6 +14,7 @@
#define __SLAVE_H__
#include "common/thread/thread.h"
#include "icecasttypes.h"
typedef
struct
_relay_server
{
char
*
server
;
...
...
@@ -23,7 +24,7 @@ typedef struct _relay_server {
char
*
password
;
char
*
localmount
;
char
*
bind
;
struct
source_t
ag
*
source
;
source_t
*
source
;
int
mp3metadata
;
int
on_demand
;
int
running
;
...
...
src/util.c
View file @
34b10657
...
...
@@ -664,7 +664,7 @@ ssize_t util_http_build_header(char * out, size_t len, ssize_t offset,
int
status
,
const
char
*
statusmsg
,
const
char
*
contenttype
,
const
char
*
charset
,
const
char
*
datablock
,
struct
source_t
ag
*
source
,
struct
_
client_t
ag
*
client
)
{
source_t
*
source
,
client_t
*
client
)
{
const
char
*
http_version
=
"1.0"
;
ice_config_t
*
config
;
time_t
now
;
...
...
src/util.h
View file @
34b10657
...
...
@@ -17,6 +17,8 @@
/* for FILE* */
#include <stdio.h>
#include "icecasttypes.h"
#define UNKNOWN_CONTENT 0
#define XSLT_CONTENT 1
#define HTML_CONTENT 2
...
...
@@ -78,15 +80,13 @@ char *util_url_escape(const char *src);
* If datablock is NULL no end-of-header nor any data is appended.
* Returns the number of bytes written or -1 on error.
*/
struct
source_tag
;
/* use forward decleration so we do not need to
* include <source.h> that would cause other conflicts. */
ssize_t
util_http_build_header
(
char
*
out
,
size_t
len
,
ssize_t
offset
,
int
cache
,
int
status
,
const
char
*
statusmsg
,
const
char
*
contenttype
,
const
char
*
charset
,
const
char
*
datablock
,
struct
source_t
ag
*
source
,
struct
_
client_t
ag
*
client
);
source_t
*
source
,
client_t
*
client
);
const
char
*
util_http_select_best
(
const
char
*
input
,
const
char
*
first
,
...);
...
...
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