mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
fix warnings, mostly related to win*-builds
svn path=/icecast/trunk/icecast/; revision=19246
This commit is contained in:
parent
7ae4664780
commit
634ab4ffc2
@ -1124,7 +1124,6 @@ static void _handle_stats_request (client_t *client, char *uri)
|
||||
|
||||
static void _handle_get_request (client_t *client, char *passed_uri)
|
||||
{
|
||||
int port;
|
||||
char *serverhost = NULL;
|
||||
int serverport = 0;
|
||||
aliases *alias;
|
||||
@ -1133,7 +1132,6 @@ static void _handle_get_request (client_t *client, char *passed_uri)
|
||||
listener_t *listen_sock;
|
||||
|
||||
config = config_get_config();
|
||||
port = config->port;
|
||||
|
||||
listen_sock = config_get_listen_sock (config, client->con);
|
||||
if (listen_sock)
|
||||
|
@ -40,8 +40,10 @@
|
||||
#define PRI_OFF_T "ld"
|
||||
#define snprintf _snprintf
|
||||
#define strncasecmp _strnicmp
|
||||
#ifndef S_ISREG
|
||||
#define S_ISREG(mode) ((mode) & _S_IFREG)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "thread/thread.h"
|
||||
#include "avl/avl.h"
|
||||
|
@ -339,7 +339,7 @@ static void _server_proc(void)
|
||||
|
||||
/* chroot the process. Watch out - we need to do this before starting other
|
||||
* threads. Change uid as well, after figuring out uid _first_ */
|
||||
|
||||
#if defined(HAVE_SETUID) || defined(HAVE_CHROOT) || defined(HAVE_SETUID)
|
||||
static void _ch_root_uid_setup(void)
|
||||
{
|
||||
ice_config_t *conf = config_get_config_unlocked();
|
||||
@ -387,8 +387,8 @@ static void _ch_root_uid_setup(void)
|
||||
|
||||
}
|
||||
#endif
|
||||
#if HAVE_SETUID
|
||||
|
||||
#if HAVE_SETUID
|
||||
if(conf->chuid)
|
||||
{
|
||||
if(getuid()) /* root check */
|
||||
@ -414,6 +414,7 @@ static void _ch_root_uid_setup(void)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WIN32_SERVICE
|
||||
int mainService(int argc, char **argv)
|
||||
@ -477,7 +478,9 @@ int main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined(HAVE_SETUID) || defined(HAVE_CHROOT) || defined(HAVE_SETUID)
|
||||
_ch_root_uid_setup(); /* Change user id and root if requested/possible */
|
||||
#endif
|
||||
|
||||
stats_initialize(); /* We have to do this later on because of threading */
|
||||
fserve_initialize(); /* This too */
|
||||
|
@ -604,7 +604,7 @@ void stats_event_time_iso8601 (const char *mount, const char *name)
|
||||
char buffer[100];
|
||||
|
||||
localtime_r (&now, &local);
|
||||
strftime (buffer, sizeof (buffer), "%FT%T%z", &local);
|
||||
strftime (buffer, sizeof (buffer), "%Y-%m-%dT%H:%M:%S%z", &local);
|
||||
stats_event (mount, name, buffer);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user