1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-23 06:25:24 +00:00

some win32-isms

and a bad free that valgrind yelled at me about

svn path=/trunk/icecast/; revision=4711
This commit is contained in:
oddsock 2003-05-15 23:19:57 +00:00
parent ddfae103f0
commit 8f84c0188a
3 changed files with 8 additions and 1 deletions

View File

@ -20,6 +20,9 @@
#include "format_mp3.h"
#include "logging.h"
#ifdef _WIN32
#define snprintf _snprintf
#endif
#define CATMODULE "admin"

View File

@ -644,7 +644,7 @@ static void _parse_paths(xmlDocPtr doc, xmlNodePtr node,
if(configuration->webroot_dir[strlen(configuration->webroot_dir)-1] == '/')
configuration->webroot_dir[strlen(configuration->webroot_dir)-1] = 0;
} else if (strcmp(node->name, "adminroot") == 0) {
if (configuration->adminroot_dir && configuration->adminroot_dir != CONFIG_DEFAULT_WEBROOT_DIR)
if (configuration->adminroot_dir && configuration->adminroot_dir != CONFIG_DEFAULT_ADMINROOT_DIR)
xmlFree(configuration->adminroot_dir);
configuration->adminroot_dir = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
if(configuration->adminroot_dir[strlen(configuration->adminroot_dir)-1] == '/')

View File

@ -726,7 +726,11 @@ static void _handle_get_request(connection_t *con,
return;
}
else if(fileserve && stat(fullpath, &statbuf) == 0 &&
#ifdef _WIN32
(statbuf.st_mode == S_IFREG))
#else
S_ISREG(statbuf.st_mode))
#endif
{
fserve_client_create(client, fullpath);
free(fullpath);