mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-10-29 17:32:23 +00:00
nDPIsrvd-collectd: Stdout should be unbuffered.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -711,6 +711,13 @@ int main(int argc, char ** argv)
|
||||
LOG(LOG_DAEMON | LOG_NOTICE, "Collectd interval: %llu", collectd_interval_ull);
|
||||
}
|
||||
|
||||
if (setvbuf(stdout, NULL, _IONBF, 0) != 0)
|
||||
{
|
||||
LOG(LOG_DAEMON | LOG_ERR,
|
||||
"Could not set stdout unbuffered: %s. Collectd may receive too old PUTVALs and complain.",
|
||||
strerror(errno));
|
||||
}
|
||||
|
||||
enum nDPIsrvd_connect_return connect_ret = nDPIsrvd_connect(sock);
|
||||
if (connect_ret != CONNECT_OK)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user