From: Florian Forster Date: Fri, 20 Nov 2015 13:58:10 +0000 (+0100) Subject: gps plugin: Use cf_util_get_service() to read the "Port" option. X-Git-Tag: collectd-5.6.0~73^2~7^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=621fa8259ea9df412a9b45c3e65ddcf34dd9d9d5;p=collectd.git gps plugin: Use cf_util_get_service() to read the "Port" option. This allows users to provide unquoted numeric ports, too. --- diff --git a/src/gps.c b/src/gps.c index cdbad791..e793cfa6 100644 --- a/src/gps.c +++ b/src/gps.c @@ -179,7 +179,7 @@ static int cgps_config (oconfig_item_t *ci) if (strcasecmp ("Host", child->key) == 0) cf_util_get_string (child, &config.host); else if (strcasecmp ("Port", child->key) == 0) - cf_util_get_string (child, &config.port); + cf_util_get_service (child, &config.port); else if (strcasecmp ("Timeout", child->key) == 0) cf_util_get_cdtime (child, &config.timeout); else if (strcasecmp ("Pause", child->key) == 0)