Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Icecast-Server
Commits
69de4ea6
Commit
69de4ea6
authored
Jul 24, 2003
by
Karl Heyes
Browse files
minor fixes. autoconf/make init clenaup, missing includes added and
compiler warnings removed svn path=/trunk/icecast/; revision=5173
parent
14918d38
Changes
7
Show whitespace changes
Inline
Side-by-side
configure.in
View file @
69de4ea6
AC_INIT(src/main.c)
AC_INIT([Icecast], [2.0-alpha-2], [icecast@xiph.org])
AC_PREREQ(2.54)
AC_PREREQ(2.54)
AC_CONFIG_SRCDIR(src/main.c)
dnl Process this file with autoconf to produce a configure script.
dnl Process this file with autoconf to produce a configure script.
AM_INIT_AUTOMAKE
(icecast,2.0-alpha-2)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_CC
AC_CANONICAL_HOST
AC_CANONICAL_HOST
...
@@ -51,8 +54,8 @@ dnl Checks for header files.
...
@@ -51,8 +54,8 @@ dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_STDC
AC_CHECK_HEADERS([alloca.h])
AC_CHECK_HEADERS([alloca.h])
AC_CHECK_HEADER(pwd.h, AC_DEFINE(CHUID, 1, [Define if you have pwd.h]),,)
AC_CHECK_HEADER
S
(pwd.h, AC_DEFINE(CHUID, 1, [Define if you have pwd.h]),,)
AC_CHECK_HEADER(unistd.h, AC_DEFINE(CHROOT, 1, [Define if you have unistd.h]),,)
AC_CHECK_HEADER
S
(unistd.h, AC_DEFINE(CHROOT, 1, [Define if you have unistd.h]),,)
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for typedefs, structures, and compiler characteristics.
...
...
src/admin.c
View file @
69de4ea6
...
@@ -188,7 +188,7 @@ xmlDocPtr admin_build_sourcelist(char *current_source)
...
@@ -188,7 +188,7 @@ xmlDocPtr admin_build_sourcelist(char *current_source)
void
admin_send_response
(
xmlDocPtr
doc
,
client_t
*
client
,
void
admin_send_response
(
xmlDocPtr
doc
,
client_t
*
client
,
int
response
,
char
*
xslt_template
)
int
response
,
char
*
xslt_template
)
{
{
c
har
*
buff
=
NULL
;
xmlC
har
*
buff
=
NULL
;
int
len
=
0
;
int
len
=
0
;
ice_config_t
*
config
;
ice_config_t
*
config
;
char
*
fullpath_xslt_template
;
char
*
fullpath_xslt_template
;
...
@@ -197,7 +197,7 @@ void admin_send_response(xmlDocPtr doc, client_t *client,
...
@@ -197,7 +197,7 @@ void admin_send_response(xmlDocPtr doc, client_t *client,
client
->
respcode
=
200
;
client
->
respcode
=
200
;
if
(
response
==
RAW
)
{
if
(
response
==
RAW
)
{
xmlDocDumpMemory
(
doc
,
(
xmlChar
**
)
&
buff
,
&
len
);
xmlDocDumpMemory
(
doc
,
&
buff
,
&
len
);
html_write
(
client
,
"HTTP/1.0 200 OK
\r\n
"
html_write
(
client
,
"HTTP/1.0 200 OK
\r\n
"
"Content-Length: %d
\r\n
"
"Content-Length: %d
\r\n
"
"Content-Type: text/xml
\r\n
"
"Content-Type: text/xml
\r\n
"
...
...
src/fserve.c
View file @
69de4ea6
...
@@ -321,10 +321,13 @@ static char *fserve_content_type(char *path)
...
@@ -321,10 +321,13 @@ static char *fserve_content_type(char *path)
{
{
char
*
ext
=
util_get_extension
(
path
);
char
*
ext
=
util_get_extension
(
path
);
mime_type
exttype
=
{
ext
,
NULL
};
mime_type
exttype
=
{
ext
,
NULL
};
mime_type
*
result
;
void
*
result
;
if
(
!
avl_get_by_key
(
mimetypes
,
&
exttype
,
(
void
**
)(
&
result
)))
if
(
!
avl_get_by_key
(
mimetypes
,
&
exttype
,
&
result
))
return
result
->
type
;
{
mime_type
*
mime
=
result
;
return
mime
->
type
;
}
else
{
else
{
/* Fallbacks for a few basic ones */
/* Fallbacks for a few basic ones */
if
(
!
strcmp
(
ext
,
"ogg"
))
if
(
!
strcmp
(
ext
,
"ogg"
))
...
@@ -459,7 +462,7 @@ static void create_mime_mappings(char *fn) {
...
@@ -459,7 +462,7 @@ static void create_mime_mappings(char *fn) {
FILE
*
mimefile
=
fopen
(
fn
,
"r"
);
FILE
*
mimefile
=
fopen
(
fn
,
"r"
);
char
line
[
4096
];
char
line
[
4096
];
char
*
type
,
*
ext
,
*
cur
;
char
*
type
,
*
ext
,
*
cur
;
mime_type
*
mapping
,
*
tmp
;
mime_type
*
mapping
;
mimetypes
=
avl_tree_new
(
_compare_mappings
,
NULL
);
mimetypes
=
avl_tree_new
(
_compare_mappings
,
NULL
);
...
@@ -494,12 +497,14 @@ static void create_mime_mappings(char *fn) {
...
@@ -494,12 +497,14 @@ static void create_mime_mappings(char *fn) {
while
(
*
cur
!=
' '
&&
*
cur
!=
'\t'
&&
*
cur
!=
'\n'
&&
*
cur
)
while
(
*
cur
!=
' '
&&
*
cur
!=
'\t'
&&
*
cur
!=
'\n'
&&
*
cur
)
cur
++
;
cur
++
;
*
cur
++
=
0
;
*
cur
++
=
0
;
if
(
*
ext
)
{
if
(
*
ext
)
{
void
*
tmp
;
/* Add a new extension->type mapping */
/* Add a new extension->type mapping */
mapping
=
malloc
(
sizeof
(
mime_type
));
mapping
=
malloc
(
sizeof
(
mime_type
));
mapping
->
ext
=
strdup
(
ext
);
mapping
->
ext
=
strdup
(
ext
);
mapping
->
type
=
strdup
(
type
);
mapping
->
type
=
strdup
(
type
);
if
(
!
avl_get_by_key
(
mimetypes
,
mapping
,
(
void
**
)(
&
tmp
))
)
if
(
!
avl_get_by_key
(
mimetypes
,
mapping
,
&
tmp
))
avl_delete
(
mimetypes
,
mapping
,
_delete_mapping
);
avl_delete
(
mimetypes
,
mapping
,
_delete_mapping
);
avl_insert
(
mimetypes
,
mapping
);
avl_insert
(
mimetypes
,
mapping
);
}
}
...
...
src/main.c
View file @
69de4ea6
...
@@ -6,6 +6,10 @@
...
@@ -6,6 +6,10 @@
#include
<stdio.h>
#include
<stdio.h>
#include
<string.h>
#include
<string.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include
"thread/thread.h"
#include
"thread/thread.h"
#include
"avl/avl.h"
#include
"avl/avl.h"
#include
"net/sock.h"
#include
"net/sock.h"
...
@@ -19,10 +23,6 @@
...
@@ -19,10 +23,6 @@
#include
<errno.h>
#include
<errno.h>
#endif
#endif
#ifdef CHROOT
#include
<unistd.h>
#endif
#include
"cfgfile.h"
#include
"cfgfile.h"
#include
"sighandler.h"
#include
"sighandler.h"
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include
"fserve.h"
#include
"fserve.h"
#ifdef USE_YP
#ifdef USE_YP
#include
"geturl.h"
#include
"geturl.h"
#include
"yp.h"
#endif
#endif
#include
<libxml/xmlmemory.h>
#include
<libxml/xmlmemory.h>
...
...
src/source.c
View file @
69de4ea6
...
@@ -158,14 +158,14 @@ int source_free_source(void *key)
...
@@ -158,14 +158,14 @@ int source_free_source(void *key)
client_t
*
source_find_client
(
source_t
*
source
,
int
id
)
client_t
*
source_find_client
(
source_t
*
source
,
int
id
)
{
{
client_t
fakeclient
;
client_t
fakeclient
;
client_t
*
result
;
void
*
result
;
connection_t
fakecon
;
connection_t
fakecon
;
fakeclient
.
con
=
&
fakecon
;
fakeclient
.
con
=
&
fakecon
;
fakeclient
.
con
->
id
=
id
;
fakeclient
.
con
->
id
=
id
;
avl_tree_rlock
(
source
->
client_tree
);
avl_tree_rlock
(
source
->
client_tree
);
if
(
avl_get_by_key
(
source
->
client_tree
,
&
fakeclient
,
(
void
**
)
&
result
)
==
0
)
if
(
avl_get_by_key
(
source
->
client_tree
,
&
fakeclient
,
&
result
)
==
0
)
{
{
avl_tree_unlock
(
source
->
client_tree
);
avl_tree_unlock
(
source
->
client_tree
);
return
result
;
return
result
;
...
...
src/stats.c
View file @
69de4ea6
...
@@ -806,7 +806,7 @@ void stats_sendxml(client_t *client)
...
@@ -806,7 +806,7 @@ void stats_sendxml(client_t *client)
xmlDocPtr
doc
;
xmlDocPtr
doc
;
xmlNodePtr
node
,
srcnode
;
xmlNodePtr
node
,
srcnode
;
int
len
;
int
len
;
c
har
*
buff
=
NULL
;
xmlC
har
*
buff
=
NULL
;
source_xml_t
*
snd
;
source_xml_t
*
snd
;
source_xml_t
*
src_nodes
=
NULL
;
source_xml_t
*
src_nodes
=
NULL
;
...
@@ -831,7 +831,7 @@ void stats_sendxml(client_t *client)
...
@@ -831,7 +831,7 @@ void stats_sendxml(client_t *client)
event
=
_get_event_from_queue
(
&
queue
);
event
=
_get_event_from_queue
(
&
queue
);
}
}
xmlDocDumpMemory
(
doc
,
(
xmlChar
**
)
&
buff
,
&
len
);
xmlDocDumpMemory
(
doc
,
&
buff
,
&
len
);
xmlFreeDoc
(
doc
);
xmlFreeDoc
(
doc
);
client
->
respcode
=
200
;
client
->
respcode
=
200
;
...
...
src/yp.c
View file @
69de4ea6
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#include
"geturl.h"
#include
"geturl.h"
#include
"source.h"
#include
"source.h"
#include
"cfgfile.h"
#include
"cfgfile.h"
#include
"stats.h"
#define CATMODULE "yp"
#define CATMODULE "yp"
...
...
Write
Preview
Supports
Markdown
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