[xiph-commits] r13553 - icecast/trunk/icecast/src
karl at svn.xiph.org
karl at svn.xiph.org
Wed Aug 15 19:13:18 PDT 2007
Author: karl
Date: 2007-08-15 19:13:18 -0700 (Wed, 15 Aug 2007)
New Revision: 13553
Modified:
icecast/trunk/icecast/src/event.c
icecast/trunk/icecast/src/slave.c
icecast/trunk/icecast/src/stats.c
icecast/trunk/icecast/src/stats.h
Log:
add general information to stats
Modified: icecast/trunk/icecast/src/event.c
===================================================================
--- icecast/trunk/icecast/src/event.c 2007-08-15 23:01:44 UTC (rev 13552)
+++ icecast/trunk/icecast/src/event.c 2007-08-16 02:13:18 UTC (rev 13553)
@@ -24,6 +24,7 @@
#include "logging.h"
#include "slave.h"
#include "fserve.h"
+#include "stats.h"
#define CATMODULE "event"
@@ -60,10 +61,11 @@
else {
config_clear(config);
config_set_config(&new_config);
- restart_logging (config_get_config_unlocked());
- yp_recheck_config (config_get_config_unlocked());
- fserve_recheck_mime_types (config_get_config_unlocked());
-
+ config = config_get_config_unlocked();
+ restart_logging (config);
+ yp_recheck_config (config);
+ fserve_recheck_mime_types (config);
+ stats_global (config);
config_release_config();
slave_recheck_all();
}
Modified: icecast/trunk/icecast/src/slave.c
===================================================================
--- icecast/trunk/icecast/src/slave.c 2007-08-15 23:01:44 UTC (rev 13552)
+++ icecast/trunk/icecast/src/slave.c 2007-08-16 02:13:18 UTC (rev 13553)
@@ -679,6 +679,9 @@
update_settings = 0;
update_streams = 0;
+ config = config_get_config();
+ stats_global (config);
+ config_release_config();
source_recheck_mounts (1);
while (1)
Modified: icecast/trunk/icecast/src/stats.c
===================================================================
--- icecast/trunk/icecast/src/stats.c 2007-08-15 23:01:44 UTC (rev 13552)
+++ icecast/trunk/icecast/src/stats.c 2007-08-16 02:13:18 UTC (rev 13553)
@@ -543,6 +543,14 @@
}
+void stats_global (ice_config_t *config)
+{
+ stats_event (NULL, "host", config->hostname);
+ stats_event (NULL, "location", config->location);
+ stats_event (NULL, "admin", config->admin);
+}
+
+
static void *_stats_thread(void *arg)
{
stats_event_t *event;
Modified: icecast/trunk/icecast/src/stats.h
===================================================================
--- icecast/trunk/icecast/src/stats.h 2007-08-15 23:01:44 UTC (rev 13552)
+++ icecast/trunk/icecast/src/stats.h 2007-08-16 02:13:18 UTC (rev 13553)
@@ -13,6 +13,7 @@
#ifndef __STATS_H__
#define __STATS_H__
+#include "cfgfile.h"
#include "connection.h"
#include "httpp/httpp.h"
#include "client.h"
@@ -73,6 +74,7 @@
void stats_initialize(void);
void stats_shutdown(void);
+void stats_global(ice_config_t *config);
stats_t *stats_get_stats(void);
void stats_get_streamlist (char *buffer, size_t remaining);
void stats_clear_virtual_mounts (void);
@@ -95,7 +97,3 @@
#endif /* __STATS_H__ */
-
-
-
-
More information about the commits
mailing list