diff --git a/src/wireless.c b/src/wireless.c
index 929d5d8a711608dc6c7b47e3dd025e3a8dbe058c..81c968e8d9b4e462a57129b6c37cb7fdd05e303d 100644 (file)
--- a/src/wireless.c
+++ b/src/wireless.c
#define WIRELESS_PROC_FILE "/proc/net/wireless"
-static data_source_t data_source_quality[1] =
-{
- {"value", DS_TYPE_GAUGE, 0, NAN}
-};
-
-static data_set_t quality_ds =
-{
- "signal_quality", 1, data_source_quality
-};
-
-static data_source_t data_source_signal[1] =
-{
- {"value", DS_TYPE_GAUGE, NAN, 0}
-};
-
-static data_set_t power_ds =
-{
- "signal_power", 1, data_source_signal
-};
-
-static data_set_t noise_ds =
-{
- "signal_noise", 1, data_source_signal
-};
-
#if WIRELESS_HAVE_READ
#if 0
static double wireless_dbm_to_watt (double dbm)
vl.values = values;
vl.values_len = 1;
vl.time = time (NULL);
- strcpy (vl.host, hostname);
+ strcpy (vl.host, hostname_g);
strcpy (vl.plugin, "wireless");
strncpy (vl.plugin_instance, plugin_instance,
sizeof (vl.plugin_instance));
/* there are a variety of names for the wireless device */
if ((fh = fopen (WIRELESS_PROC_FILE, "r")) == NULL)
{
- syslog (LOG_WARNING, "wireless: fopen: %s", strerror (errno));
+ char errbuf[1024];
+ WARNING ("wireless: fopen: %s",
+ sstrerror (errno, errbuf, sizeof (errbuf)));
return (-1);
}
void module_register (void)
{
- plugin_register_data_set (&quality_ds);
- plugin_register_data_set (&power_ds);
- plugin_register_data_set (&noise_ds);
-
#if WIRELESS_HAVE_READ
plugin_register_read ("wireless", wireless_read);
#endif /* WIRELESS_HAVE_READ */
-}
+} /* void module_register */