From 76247629ff3695b0e0286723b0473d8caccbfab4 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 11 Apr 2013 08:37:51 -0700 Subject: [PATCH] netcmd plugin: Use cf_util_get_service() to handle the "Port" option. --- src/collectd.conf.pod | 3 +-- src/netcmd.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index e8e1f3e5..43f3c4b8 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -3911,8 +3911,7 @@ Address or hostname to bind to. If not specified, bind to the I address. =item B I|I -Port number or service name to bind to. Defaults to C<"25826">. Please note -that even numeric ports must be specified as a string. +Port number or service name to bind to. Defaults to C<"25826">. =item B I diff --git a/src/netcmd.c b/src/netcmd.c index c46e5a7a..bc052ed9 100644 --- a/src/netcmd.c +++ b/src/netcmd.c @@ -1218,7 +1218,7 @@ static int nc_config_peer (const oconfig_item_t *ci) /* {{{ */ if (strcasecmp ("Address", child->key) == 0) cf_util_get_string (child, &p->node); else if (strcasecmp ("Port", child->key) == 0) - cf_util_get_string (child, &p->service); + cf_util_get_service (child, &p->service); else if (strcasecmp ("TLSCertFile", child->key) == 0) cf_util_get_string (child, &p->tls_cert_file); else if (strcasecmp ("TLSKeyFile", child->key) == 0) -- 2.11.0