[xiph-cvs] cvs commit: icecast/src admin.c fserve.c main.c source.c stats.c yp.c
Karl Heyes
karl at xiph.org
Thu Jul 24 09:21:22 PDT 2003
karl 03/07/24 12:21:22
Modified: . configure.in
src admin.c fserve.c main.c source.c stats.c yp.c
Log:
minor fixes. autoconf/make init clenaup, missing includes added and
compiler warnings removed
Revision Changes Path
1.38 +7 -4 icecast/configure.in
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/icecast/configure.in,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- configure.in 24 Jul 2003 05:32:36 -0000 1.37
+++ configure.in 24 Jul 2003 16:21:22 -0000 1.38
@@ -1,9 +1,12 @@
-AC_INIT(src/main.c)
+AC_INIT([Icecast], [2.0-alpha-2], [icecast at xiph.org])
+
AC_PREREQ(2.54)
+AC_CONFIG_SRCDIR(src/main.c)
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_MAINTAINER_MODE
AC_PROG_CC
AC_CANONICAL_HOST
@@ -51,8 +54,8 @@
AC_HEADER_STDC
AC_CHECK_HEADERS([alloca.h])
-AC_CHECK_HEADER(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_HEADERS(pwd.h, AC_DEFINE(CHUID, 1, [Define if you have pwd.h]),,)
+AC_CHECK_HEADERS(unistd.h, AC_DEFINE(CHROOT, 1, [Define if you have unistd.h]),,)
dnl Checks for typedefs, structures, and compiler characteristics.
<p><p>1.14 +2 -2 icecast/src/admin.c
Index: admin.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/admin.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- admin.c 21 Jul 2003 01:58:54 -0000 1.13
+++ admin.c 24 Jul 2003 16:21:22 -0000 1.14
@@ -188,7 +188,7 @@
void admin_send_response(xmlDocPtr doc, client_t *client,
int response, char *xslt_template)
{
- char *buff = NULL;
+ xmlChar *buff = NULL;
int len = 0;
ice_config_t *config;
char *fullpath_xslt_template;
@@ -197,7 +197,7 @@
client->respcode = 200;
if (response == RAW) {
- xmlDocDumpMemory(doc, (xmlChar **)&buff, &len);
+ xmlDocDumpMemory(doc, &buff, &len);
html_write(client, "HTTP/1.0 200 OK\r\n"
"Content-Length: %d\r\n"
"Content-Type: text/xml\r\n"
<p><p>1.15 +11 -6 icecast/src/fserve.c
Index: fserve.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/fserve.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- fserve.c 21 Jul 2003 01:58:54 -0000 1.14
+++ fserve.c 24 Jul 2003 16:21:22 -0000 1.15
@@ -321,10 +321,13 @@
{
char *ext = util_get_extension(path);
mime_type exttype = {ext, NULL};
- mime_type *result;
+ void *result;
- if(!avl_get_by_key(mimetypes, &exttype, (void **)(&result)))
- return result->type;
+ if (!avl_get_by_key (mimetypes, &exttype, &result))
+ {
+ mime_type *mime = result;
+ return mime->type;
+ }
else {
/* Fallbacks for a few basic ones */
if(!strcmp(ext, "ogg"))
@@ -459,7 +462,7 @@
FILE *mimefile = fopen(fn, "r");
char line[4096];
char *type, *ext, *cur;
- mime_type *mapping, *tmp;
+ mime_type *mapping;
mimetypes = avl_tree_new(_compare_mappings, NULL);
@@ -494,12 +497,14 @@
while(*cur != ' ' && *cur != '\t' && *cur != '\n' && *cur)
cur++;
*cur++ = 0;
- if(*ext) {
+ if(*ext)
+ {
+ void *tmp;
/* Add a new extension->type mapping */
mapping = malloc(sizeof(mime_type));
mapping->ext = strdup(ext);
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_insert(mimetypes, mapping);
}
<p><p>1.33 +5 -4 icecast/src/main.c
Index: main.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/main.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- main.c 24 Jul 2003 05:32:37 -0000 1.32
+++ main.c 24 Jul 2003 16:21:22 -0000 1.33
@@ -6,6 +6,10 @@
#include <stdio.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
#include "thread/thread.h"
#include "avl/avl.h"
#include "net/sock.h"
@@ -19,10 +23,6 @@
#include <errno.h>
#endif
-#ifdef CHROOT
-#include <unistd.h>
-#endif
-
#include "cfgfile.h"
#include "sighandler.h"
@@ -38,6 +38,7 @@
#include "fserve.h"
#ifdef USE_YP
#include "geturl.h"
+#include "yp.h"
#endif
#include <libxml/xmlmemory.h>
<p><p>1.59 +2 -2 icecast/src/source.c
Index: source.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/source.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- source.c 21 Jul 2003 01:58:54 -0000 1.58
+++ source.c 24 Jul 2003 16:21:22 -0000 1.59
@@ -158,14 +158,14 @@
client_t *source_find_client(source_t *source, int id)
{
client_t fakeclient;
- client_t *result;
+ void *result;
connection_t fakecon;
fakeclient.con = &fakecon;
fakeclient.con->id = id;
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);
return result;
<p><p>1.28 +2 -2 icecast/src/stats.c
Index: stats.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/stats.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- stats.c 21 Jul 2003 01:58:54 -0000 1.27
+++ stats.c 24 Jul 2003 16:21:22 -0000 1.28
@@ -806,7 +806,7 @@
xmlDocPtr doc;
xmlNodePtr node, srcnode;
int len;
- char *buff = NULL;
+ xmlChar *buff = NULL;
source_xml_t *snd;
source_xml_t *src_nodes = NULL;
@@ -831,7 +831,7 @@
event = _get_event_from_queue(&queue);
}
- xmlDocDumpMemory(doc, (xmlChar **)&buff, &len);
+ xmlDocDumpMemory(doc, &buff, &len);
xmlFreeDoc(doc);
client->respcode = 200;
<p><p>1.13 +1 -0 icecast/src/yp.c
Index: yp.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/yp.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- yp.c 21 Jul 2003 01:58:54 -0000 1.12
+++ yp.c 24 Jul 2003 16:21:22 -0000 1.13
@@ -17,6 +17,7 @@
#include "geturl.h"
#include "source.h"
#include "cfgfile.h"
+#include "stats.h"
#define CATMODULE "yp"
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list