Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Icecast-Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
94
Issues
94
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
Icecast-Server
Commits
33cf86f5
Commit
33cf86f5
authored
Aug 07, 2005
by
Karl Heyes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge extra checks. minor cleanup work
svn path=/icecast/trunk/icecast/; revision=9711
parent
e2e35fe5
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
36 additions
and
15 deletions
+36
-15
src/auth.h
src/auth.h
+1
-1
src/cfgfile.c
src/cfgfile.c
+2
-0
src/client.h
src/client.h
+2
-2
src/connection.c
src/connection.c
+1
-1
src/format.c
src/format.c
+1
-1
src/format_ogg.c
src/format_ogg.c
+16
-6
src/format_ogg.h
src/format_ogg.h
+1
-0
src/refbuf.h
src/refbuf.h
+2
-0
src/source.c
src/source.c
+10
-4
No files found.
src/auth.h
View file @
33cf86f5
...
...
@@ -40,7 +40,7 @@ typedef struct auth_tag
source_t
*
source
,
char
*
username
,
char
*
password
);
void
(
*
free
)(
struct
auth_tag
*
self
);
void
*
state
;
void
*
type
;
char
*
type
;
}
auth_t
;
auth_result
auth_check_client
(
source_t
*
source
,
client_t
*
client
);
...
...
src/cfgfile.c
View file @
33cf86f5
...
...
@@ -768,6 +768,8 @@ static void _parse_listen_socket(xmlDocPtr doc, xmlNodePtr node,
}
}
if
(
listener
==
NULL
)
return
;
do
{
if
(
node
==
NULL
)
break
;
if
(
xmlIsBlankNode
(
node
))
continue
;
...
...
src/client.h
View file @
33cf86f5
...
...
@@ -32,8 +32,8 @@ typedef struct _client_tag
/* http response code for this client */
int
respcode
;
/* is client getting intro data */
long
intro_offset
;
/* is client getting intro data */
long
intro_offset
;
/* where in the queue the client is */
refbuf_t
*
refbuf
;
...
...
src/connection.c
View file @
33cf86f5
...
...
@@ -898,7 +898,7 @@ static void _handle_get_request (client_t *client, char *passed_uri)
client
->
write_to_client
=
format_generic_write_to_client
;
client
->
check_buffer
=
format_check_http_buffer
;
client
->
refbuf
=
refbuf_new
(
4096
);
client
->
refbuf
=
refbuf_new
(
PER_CLIENT_REFBUF_SIZE
);
avl_tree_wlock
(
source
->
pending_tree
);
avl_insert
(
source
->
pending_tree
,
(
void
*
)
client
);
...
...
src/format.c
View file @
33cf86f5
...
...
@@ -156,7 +156,7 @@ int format_check_file_buffer (source_t *source, client_t *client)
return
-
1
;
}
/* source -> file fallback, need a refbuf for data */
refbuf
=
refbuf_new
(
4096
);
refbuf
=
refbuf_new
(
PER_CLIENT_REFBUF_SIZE
);
client
->
refbuf
=
refbuf
;
client
->
pos
=
refbuf
->
len
;
client
->
intro_offset
=
0
;
...
...
src/format_ogg.c
View file @
33cf86f5
...
...
@@ -150,6 +150,7 @@ static void free_ogg_codecs (ogg_state_t *ogg_info)
ogg_info
->
codecs
=
NULL
;
ogg_info
->
current
=
NULL
;
ogg_info
->
bos_completed
=
0
;
ogg_info
->
codec_count
=
0
;
}
...
...
@@ -211,6 +212,12 @@ static int process_initial_page (format_plugin_t *plugin, ogg_page *page)
}
do
{
if
(
ogg_info
->
codec_count
>
10
)
{
ERROR0
(
"many codecs in stream, playing safe, dropping source"
);
ogg_info
->
error
=
1
;
return
-
1
;
}
codec
=
initial_vorbis_page
(
plugin
,
page
);
if
(
codec
)
break
;
...
...
@@ -241,6 +248,7 @@ static int process_initial_page (format_plugin_t *plugin, ogg_page *page)
/* add codec to list */
codec
->
next
=
ogg_info
->
codecs
;
ogg_info
->
codecs
=
codec
;
ogg_info
->
codec_count
++
;
}
return
0
;
...
...
@@ -374,14 +382,14 @@ static refbuf_t *ogg_get_buffer (source_t *source)
ogg_state_t
*
ogg_info
=
source
->
format
->
_state
;
format_plugin_t
*
format
=
source
->
format
;
char
*
data
=
NULL
;
int
bytes
;
int
bytes
=
0
;
while
(
1
)
{
while
(
1
)
{
ogg_page
page
;
refbuf_t
*
refbuf
;
refbuf_t
*
refbuf
=
NULL
;
ogg_codec_t
*
codec
=
ogg_info
->
current
;
/* if a codec has just been given a page then process it */
...
...
@@ -399,10 +407,12 @@ static refbuf_t *ogg_get_buffer (source_t *source)
if
(
ogg_page_bos
(
&
page
))
{
process_initial_page
(
source
->
format
,
&
page
);
continue
;
}
ogg_info
->
bos_completed
=
1
;
refbuf
=
process_ogg_page
(
ogg_info
,
&
page
);
else
{
ogg_info
->
bos_completed
=
1
;
refbuf
=
process_ogg_page
(
ogg_info
,
&
page
);
}
if
(
ogg_info
->
error
)
{
ERROR0
(
"Problem processing stream"
);
...
...
@@ -420,7 +430,7 @@ static refbuf_t *ogg_get_buffer (source_t *source)
data
=
ogg_sync_buffer
(
&
ogg_info
->
oy
,
4096
);
bytes
=
client_read_bytes
(
source
->
client
,
data
,
4096
);
if
(
bytes
<
0
)
if
(
bytes
<
=
0
)
{
ogg_sync_wrote
(
&
ogg_info
->
oy
,
0
);
return
NULL
;
...
...
src/format_ogg.h
View file @
33cf86f5
...
...
@@ -28,6 +28,7 @@ typedef struct ogg_state_tag
ogg_sync_state
oy
;
int
error
;
int
codec_count
;
struct
ogg_codec_tag
*
codecs
;
char
*
artist
;
char
*
title
;
...
...
src/refbuf.h
View file @
33cf86f5
...
...
@@ -36,5 +36,7 @@ refbuf_t *refbuf_new(unsigned long size);
void
refbuf_addref
(
refbuf_t
*
self
);
void
refbuf_release
(
refbuf_t
*
self
);
#define PER_CLIENT_REFBUF_SIZE 4096
#endif
/* __REFBUF_H__ */
src/source.c
View file @
33cf86f5
...
...
@@ -610,8 +610,11 @@ static void source_init (source_t *source)
source
->
running
=
1
;
mountinfo
=
config_find_mount
(
config_get_config
(),
source
->
mount
);
if
(
mountinfo
&&
mountinfo
->
on_connect
)
source_run_script
(
mountinfo
->
on_connect
,
source
->
mount
);
if
(
mountinfo
)
{
if
(
mountinfo
->
on_connect
)
source_run_script
(
mountinfo
->
on_connect
,
source
->
mount
);
}
config_release_config
();
/*
...
...
@@ -810,8 +813,11 @@ static void source_shutdown (source_t *source)
INFO1
(
"Source
\"
%s
\"
exiting"
,
source
->
mount
);
mountinfo
=
config_find_mount
(
config_get_config
(),
source
->
mount
);
if
(
mountinfo
&&
mountinfo
->
on_disconnect
)
source_run_script
(
mountinfo
->
on_disconnect
,
source
->
mount
);
if
(
mountinfo
)
{
if
(
mountinfo
->
on_disconnect
)
source_run_script
(
mountinfo
->
on_disconnect
,
source
->
mount
);
}
config_release_config
();
/* we have de-activated the source now, so no more clients will be
...
...
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