ulog: implement ulog_close()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
ca6d547205
commit
2a9edb4642
1 changed files with 13 additions and 0 deletions
13
ulog.c
13
ulog.c
|
@ -121,11 +121,24 @@ static void ulog_syslog(int priority, const char *fmt, va_list ap)
|
|||
|
||||
void ulog_open(int channels, int facility, const char *ident)
|
||||
{
|
||||
ulog_close();
|
||||
|
||||
_ulog_channels = channels;
|
||||
_ulog_facility = facility;
|
||||
_ulog_ident = ident;
|
||||
}
|
||||
|
||||
void ulog_close(void)
|
||||
{
|
||||
if (!_ulog_initialized)
|
||||
return;
|
||||
|
||||
if (_ulog_channels & ULOG_SYSLOG)
|
||||
closelog();
|
||||
|
||||
_ulog_initialized = 0;
|
||||
}
|
||||
|
||||
void ulog_threshold(int threshold)
|
||||
{
|
||||
_ulog_threshold = threshold;
|
||||
|
|
Loading…
Reference in a new issue