Commit 15016583 authored by Karl Heyes's avatar Karl Heyes

make caller of restart_logging pass the config, don't assume it's locked

svn path=/icecast/trunk/icecast/; revision=7595
parent e0ab0d85
...@@ -57,9 +57,9 @@ void event_config_read(void *arg) ...@@ -57,9 +57,9 @@ void event_config_read(void *arg)
else { else {
config_clear(config); config_clear(config);
config_set_config(&new_config); config_set_config(&new_config);
restart_logging (); restart_logging (config_get_config_unlocked());
slave_recheck(); slave_recheck();
yp_recheck_config (config); yp_recheck_config (config_get_config_unlocked());
config_release_config(); config_release_config();
} }
......
...@@ -98,10 +98,8 @@ void logging_access(client_t *client) ...@@ -98,10 +98,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, "-")) if (strcmp (config->error_log, "-"))
{ {
char fn_error[FILENAME_MAX]; char fn_error[FILENAME_MAX];
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#ifndef __LOGGING_H__ #ifndef __LOGGING_H__
#define __LOGGING_H__ #define __LOGGING_H__
#include "cfgfile.h"
#include "log/log.h" #include "log/log.h"
/* declare the global log descriptors */ /* declare the global log descriptors */
...@@ -87,7 +88,7 @@ extern int accesslog; ...@@ -87,7 +88,7 @@ extern int accesslog;
#define LOGGING_FORMAT_CLF "%d/%b/%Y:%H:%M:%S %z" #define LOGGING_FORMAT_CLF "%d/%b/%Y:%H:%M:%S %z"
void logging_access(client_t *client); void logging_access(client_t *client);
void restart_logging (void); void restart_logging (ice_config_t *config);
#endif /* __LOGGING_H__ */ #endif /* __LOGGING_H__ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment