projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-4.1'
[collectd.git]
/
src
/
network.c
diff --git
a/src/network.c
b/src/network.c
index
ad8d530
..
21b9694
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-1091,7
+1091,6
@@
static int add_to_buffer (char *buffer, int buffer_size,
vl->host, strlen (vl->host)) != 0)
return (-1);
strcpy (vl_def->host, vl->host);
vl->host, strlen (vl->host)) != 0)
return (-1);
strcpy (vl_def->host, vl->host);
- DEBUG ("network plugin: add_to_buffer: host = %s", vl->host);
}
if (vl_def->time != vl->time)
}
if (vl_def->time != vl->time)
@@
-1100,8
+1099,6
@@
static int add_to_buffer (char *buffer, int buffer_size,
(uint64_t) vl->time))
return (-1);
vl_def->time = vl->time;
(uint64_t) vl->time))
return (-1);
vl_def->time = vl->time;
- DEBUG ("network plugin: add_to_buffer: time = %u",
- (unsigned int) vl->time);
}
if (vl_def->interval != vl->interval)
}
if (vl_def->interval != vl->interval)
@@
-1110,8
+1107,6
@@
static int add_to_buffer (char *buffer, int buffer_size,
(uint64_t) vl->interval))
return (-1);
vl_def->interval = vl->interval;
(uint64_t) vl->interval))
return (-1);
vl_def->interval = vl->interval;
- DEBUG ("network plugin: add_to_buffer: interval = %i",
- (int) vl->interval);
}
if (strcmp (vl_def->plugin, vl->plugin) != 0)
}
if (strcmp (vl_def->plugin, vl->plugin) != 0)
@@
-1120,8
+1115,6
@@
static int add_to_buffer (char *buffer, int buffer_size,
vl->plugin, strlen (vl->plugin)) != 0)
return (-1);
strcpy (vl_def->plugin, vl->plugin);
vl->plugin, strlen (vl->plugin)) != 0)
return (-1);
strcpy (vl_def->plugin, vl->plugin);
- DEBUG ("network plugin: add_to_buffer: plugin = %s",
- vl->plugin);
}
if (strcmp (vl_def->plugin_instance, vl->plugin_instance) != 0)
}
if (strcmp (vl_def->plugin_instance, vl->plugin_instance) != 0)
@@
-1131,8
+1124,6
@@
static int add_to_buffer (char *buffer, int buffer_size,
strlen (vl->plugin_instance)) != 0)
return (-1);
strcpy (vl_def->plugin_instance, vl->plugin_instance);
strlen (vl->plugin_instance)) != 0)
return (-1);
strcpy (vl_def->plugin_instance, vl->plugin_instance);
- DEBUG ("network plugin: add_to_buffer: plugin_instance = %s",
- vl->plugin_instance);
}
if (strcmp (type_def, ds->type) != 0)
}
if (strcmp (type_def, ds->type) != 0)
@@
-1141,7
+1132,6
@@
static int add_to_buffer (char *buffer, int buffer_size,
ds->type, strlen (ds->type)) != 0)
return (-1);
strcpy (type_def, ds->type);
ds->type, strlen (ds->type)) != 0)
return (-1);
strcpy (type_def, ds->type);
- DEBUG ("network plugin: add_to_buffer: type = %s", ds->type);
}
if (strcmp (vl_def->type_instance, vl->type_instance) != 0)
}
if (strcmp (vl_def->type_instance, vl->type_instance) != 0)
@@
-1151,8
+1141,6
@@
static int add_to_buffer (char *buffer, int buffer_size,
strlen (vl->type_instance)) != 0)
return (-1);
strcpy (vl_def->type_instance, vl->type_instance);
strlen (vl->type_instance)) != 0)
return (-1);
strcpy (vl_def->type_instance, vl->type_instance);
- DEBUG ("network plugin: add_to_buffer: type_instance = %s",
- vl->type_instance);
}
if (write_part_values (&buffer, &buffer_size, ds, vl) != 0)
}
if (write_part_values (&buffer, &buffer_size, ds, vl) != 0)
@@
-1249,7
+1237,11
@@
static int network_config (const char *key, const char *val)
&& (fields_num != 2))
return (1);
else if (fields_num == 2)
&& (fields_num != 2))
return (1);
else if (fields_num == 2)
+ {
+ if ((service = strchr (fields[1], '.')) != NULL)
+ *service = '\0';
service = fields[1];
service = fields[1];
+ }
node = fields[0];
if (strcasecmp ("Listen", key) == 0)
node = fields[0];
if (strcasecmp ("Listen", key) == 0)
@@
-1290,8
+1282,6
@@
static int network_config (const char *key, const char *val)
static int network_shutdown (void)
{
static int network_shutdown (void)
{
- DEBUG ("Shutting down.");
-
listen_loop++;
if (listen_thread != (pthread_t) 0)
listen_loop++;
if (listen_thread != (pthread_t) 0)
@@
-1301,7
+1291,8
@@
static int network_shutdown (void)
listen_thread = (pthread_t) 0;
}
listen_thread = (pthread_t) 0;
}
- listen_thread = 0;
+ if (send_buffer_fill > 0)
+ flush_buffer ();
if (cache_tree != NULL)
{
if (cache_tree != NULL)
{