X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsnmp.c;h=54bcf67242170ea93c6cdc070a5a81a8196ed067;hb=a04ffbda508739433df0975328100e33e7986c87;hp=e78ade9735538114ad9004d1e4e2ed493f101603;hpb=edd0e2639a241167e213ec301bfc71c7d291ee61;p=collectd.git diff --git a/src/snmp.c b/src/snmp.c index e78ade97..54bcf672 100644 --- a/src/snmp.c +++ b/src/snmp.c @@ -1057,7 +1057,7 @@ static int csnmp_dispatch_table (host_definition_t *host, data_definition_t *dat sstrncpy (vl.host, host->name, sizeof (vl.host)); sstrncpy (vl.plugin, "snmp", sizeof (vl.plugin)); - vl.interval = (int) CDTIME_T_TO_TIME_T (host->interval); + vl.interval = host->interval; subid = 0; have_more = 1; @@ -1445,7 +1445,7 @@ static int csnmp_read_value (host_definition_t *host, data_definition_t *data) sstrncpy (vl.type, data->type, sizeof (vl.type)); sstrncpy (vl.type_instance, data->instance.string, sizeof (vl.type_instance)); - vl.interval = (int) CDTIME_T_TO_TIME_T (host->interval); + vl.interval = host->interval; req = snmp_pdu_create (SNMP_MSG_GET); if (req == NULL) @@ -1518,9 +1518,8 @@ static int csnmp_read_host (user_data_t *ud) host = ud->data; - /* FIXME: Convert "interval_g" to cdtime_t, too. */ if (host->interval == 0) - host->interval = TIME_T_TO_CDTIME_T (interval_g); + host->interval = interval_g; time_start = cdtime ();