Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
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;