mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-01-03 14:56:34 -05: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:
parent
ddfae103f0
commit
8f84c0188a
@ -20,6 +20,9 @@
|
||||
#include "format_mp3.h"
|
||||
|
||||
#include "logging.h"
|
||||
#ifdef _WIN32
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#define CATMODULE "admin"
|
||||
|
||||
|
@ -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] == '/')
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user