X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fonewire.c;h=486e47136a1e9bdae5f532cdcaff5ec0af420b91;hp=d308122accc1f4953e4f2cb7e17daa943bd0157f;hb=633c3966f770e4d46651a2fe219a18d8a9907a9f;hpb=3c11483706eebaac9650a4bf051dfd665ff8ed0f diff --git a/src/onewire.c b/src/onewire.c index d308122a..486e4713 100644 --- a/src/onewire.c +++ b/src/onewire.c @@ -1,6 +1,6 @@ /** - * collectd - src/owfs.c - * Copyright (C) 2008 Florian octo Forster + * collectd - src/onewire.c + * Copyright (C) 2008 noris network AG * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -59,7 +59,7 @@ static ow_family_features_t ow_family_features[] = static int ow_family_features_num = STATIC_ARRAY_SIZE (ow_family_features); static char *device_g = NULL; -static int ow_interval = 0; +static cdtime_t ow_interval = 0; static const char *config_keys[] = { @@ -309,7 +309,8 @@ static int cow_init (void) CDTIME_T_TO_TIMESPEC (ow_interval, &cb_interval); plugin_register_complex_read (/* group = */ NULL, "onewire", cow_read, - &cb_interval, /* user data = */ NULL); + (ow_interval != 0) ? &cb_interval : NULL, + /* user data = */ NULL); plugin_register_shutdown ("onewire", cow_shutdown); return (0);