X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnetwork.c;h=8eab08b6f74ec56ffd6ea419679abdc7d9f4780f;hb=98153711785e87dbeb7d0e8c19075bc0a780e04f;hp=be4c3baeb71b42dbc13ec74e59382c09ced1c488;hpb=2079ee1517e34de372f58e7e2267ad5c71a8a41f;p=collectd.git diff --git a/src/network.c b/src/network.c index be4c3bae..8eab08b6 100644 --- a/src/network.c +++ b/src/network.c @@ -292,7 +292,7 @@ static char *send_buffer; static char *send_buffer_ptr; static int send_buffer_fill; static cdtime_t send_buffer_last_update; -static value_list_t send_buffer_vl = VALUE_LIST_STATIC; +static value_list_t send_buffer_vl = VALUE_LIST_INIT; static pthread_mutex_t send_buffer_lock = PTHREAD_MUTEX_INITIALIZER; /* XXX: These counters are incremented from one place only. The spot in which @@ -3082,7 +3082,6 @@ static int network_stats_read(void) /* {{{ */ vl.values = values; vl.values_len = 2; vl.time = 0; - sstrncpy(vl.host, hostname_g, sizeof(vl.host)); sstrncpy(vl.plugin, "network", sizeof(vl.plugin)); /* Octets received / sent */ @@ -3163,7 +3162,8 @@ static int network_init(void) { if (dispatch_thread_running == 0) { int status; status = plugin_thread_create(&dispatch_thread_id, NULL /* no attributes */, - dispatch_thread, NULL /* no argument */); + dispatch_thread, NULL /* no argument */, + "network disp"); if (status != 0) { char errbuf[1024]; ERROR("network: pthread_create failed: %s", @@ -3176,7 +3176,8 @@ static int network_init(void) { if (receive_thread_running == 0) { int status; status = plugin_thread_create(&receive_thread_id, NULL /* no attributes */, - receive_thread, NULL /* no argument */); + receive_thread, NULL /* no argument */, + "network recv"); if (status != 0) { char errbuf[1024]; ERROR("network: pthread_create failed: %s",