X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnetwork.c;h=c81d7110664da7d5217d07cc4e3076fc55eec640;hb=09c6d16ffba1b1b15e50579bbcf663f05f630932;hp=b0f8303f552a37e16c06ebd2b147bb87a90f8a49;hpb=5e73df5f8ec52055e5f79be5d898e5baec4c9967;p=collectd.git diff --git a/src/network.c b/src/network.c index b0f8303f..c81d7110 100644 --- 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); - DEBUG ("network plugin: add_to_buffer: host = %s", vl->host); } 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; - DEBUG ("network plugin: add_to_buffer: time = %u", - (unsigned int) vl->time); } if (vl_def->interval != vl->interval) @@ -1120,8 +1117,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); - DEBUG ("network plugin: add_to_buffer: plugin = %s", - vl->plugin); } if (strcmp (vl_def->plugin_instance, vl->plugin_instance) != 0) @@ -1131,8 +1126,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); - DEBUG ("network plugin: add_to_buffer: plugin_instance = %s", - vl->plugin_instance); } if (strcmp (type_def, ds->type) != 0) @@ -1141,7 +1134,6 @@ static int add_to_buffer (char *buffer, int buffer_size, 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) @@ -1151,8 +1143,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); - DEBUG ("network plugin: add_to_buffer: type_instance = %s", - vl->type_instance); } if (write_part_values (&buffer, &buffer_size, ds, vl) != 0) @@ -1294,8 +1284,6 @@ static int network_config (const char *key, const char *val) static int network_shutdown (void) { - DEBUG ("Shutting down."); - listen_loop++; if (listen_thread != (pthread_t) 0) @@ -1305,7 +1293,8 @@ static int network_shutdown (void) listen_thread = (pthread_t) 0; } - listen_thread = 0; + if (send_buffer_fill > 0) + flush_buffer (); if (cache_tree != NULL) {