Use log() instead of printf(), to reduce flood on console.
MFC after: 1 week
This commit is contained in:
parent
951e4d1c91
commit
18c54fe665
@ -34,6 +34,7 @@ static const char rcs_id[] =
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/syslog.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
@ -587,7 +588,8 @@ export_send(priv_p priv)
|
||||
|
||||
header->count = htons(header->count);
|
||||
if ((m = m_devget((caddr_t)header, mlen, 0, NULL, NULL)) == NULL) {
|
||||
printf("ng_netflow: m_devget() failed, losing export dgram\n");
|
||||
log(LOG_CRIT, "ng_netflow: m_devget() failed, losing export "
|
||||
"dgram\n");
|
||||
header->count = 0;
|
||||
return(ENOBUFS);
|
||||
}
|
||||
@ -671,7 +673,8 @@ ng_netflow_expire(void *arg)
|
||||
*/
|
||||
|
||||
if ((error = export_add(priv, fle)) != 0)
|
||||
printf("ng_netflow: export_add() failed: %u\n", error);
|
||||
log(LOG_CRIT, "ng_netflow: export_add() failed: %u\n",
|
||||
error);
|
||||
(void )free_flow(priv, fle);
|
||||
|
||||
mtx_lock(&priv->expire_mtx);
|
||||
@ -710,8 +713,8 @@ ng_netflow_expire(void *arg)
|
||||
mtx_unlock(&priv->work_mtx);
|
||||
|
||||
if ((error = export_add(priv, fle)) != 0)
|
||||
printf("ng_netflow: export_add() failed: %u\n",
|
||||
error);
|
||||
log(LOG_CRIT, "ng_netflow: export_add() "
|
||||
"failed: %u\n", error);
|
||||
|
||||
used = free_flow(priv, fle);
|
||||
|
||||
|
@ -35,6 +35,7 @@ static const char rcs_id[] =
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/syslog.h>
|
||||
#include <sys/ctype.h>
|
||||
|
||||
#include <net/if.h>
|
||||
@ -417,7 +418,7 @@ ng_netflow_rcvdata (hook_p hook, item_p item)
|
||||
* Data arrived on export hook.
|
||||
* This must not happen.
|
||||
*/
|
||||
printf("ng_netflow: incoming data on export hook!\n");
|
||||
log(LOG_ERR, "ng_netflow: incoming data on export hook!\n");
|
||||
ERROUT(EINVAL);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user