1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-11-03 04:17:17 -05:00

better to require the logging restart function to be passed

the config, so that the locking is determined by the caller

svn path=/icecast/branches/kh/icecast/; revision=7520
This commit is contained in:
Karl Heyes 2004-08-11 01:53:10 +00:00
parent b15b49fff4
commit 3a51eb4e38
4 changed files with 6 additions and 7 deletions

View File

@ -569,9 +569,9 @@ static int admin_function (const char *function, char *buf, unsigned int len)
{
if (strcmp (function, "reopenlog") == 0)
{
config_get_config();
ice_config_t *config = config_get_config();
restart_logging();
restart_logging (config);
config_release_config();
snprintf (buf, len, "Re-opening log files");
return 0;

View File

@ -58,7 +58,7 @@ void event_config_read(void *arg)
else {
config_clear(config);
config_set_config(&new_config);
restart_logging ();
restart_logging (config);
slave_recheck();
yp_recheck_config (config);
source_update (config);

View File

@ -99,10 +99,8 @@ void logging_access(client_t *client)
void restart_logging ()
void restart_logging (ice_config_t *config)
{
ice_config_t *config = config_get_config_unlocked();
if (strcmp (config->error_log, "-"))
{
char fn_error[FILENAME_MAX];

View File

@ -13,6 +13,7 @@
#ifndef __LOGGING_H__
#define __LOGGING_H__
#include "cfgfile.h"
#include "log/log.h"
/* declare the global log descriptors */
@ -87,7 +88,7 @@ extern int accesslog;
#define LOGGING_FORMAT_CLF "%d/%b/%Y:%H:%M:%S %z"
void logging_access(client_t *client);
void restart_logging (void);
void restart_logging (ice_config_t *config);
#endif /* __LOGGING_H__ */