summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 873ee04)
raw | patch | inline | side by side (parent: 873ee04)
author | Tim Laszlo <Tim.Laszlo@magnetar.com> | |
Fri, 20 Jun 2014 14:00:43 +0000 (09:00 -0500) | ||
committer | Tim Laszlo <Tim.Laszlo@magnetar.com> | |
Fri, 20 Jun 2014 14:00:43 +0000 (09:00 -0500) |
If TimeToLive is defined in collectd.conf after Server options, the
net_config_ttl value is updated after network_config_add_server and
the desired ttl is not used.
net_config_ttl value is updated after network_config_add_server and
the desired ttl is not used.
src/network.c | patch | blob | history |
diff --git a/src/network.c b/src/network.c
index 8cf170313e2b402625602622c0b01603aca3a03b..5769da792a680d91c8883f53ef714ea05135bb24 100644 (file)
--- a/src/network.c
+++ b/src/network.c
{
int i;
+ /* The options need to be applied first */
+ for (i = 0; i < ci->children_num; i++)
+ {
+ oconfig_item_t *child = ci->children + i;
+ if (strcasecmp ("TimeToLive", child->key) == 0)
+ network_config_set_ttl (child);
+ }
+
for (i = 0; i < ci->children_num; i++)
{
oconfig_item_t *child = ci->children + i;
network_config_add_listen (child);
else if (strcasecmp ("Server", child->key) == 0)
network_config_add_server (child);
- else if (strcasecmp ("TimeToLive", child->key) == 0)
- network_config_set_ttl (child);
+ else if (strcasecmp ("TimeToLive", child->key) == 0) {
+ /* Handled earlier */
+ }
else if (strcasecmp ("MaxPacketSize", child->key) == 0)
network_config_set_buffer_size (child);
else if (strcasecmp ("Forward", child->key) == 0)