Change in libosmocore[master]: logging: fix log_target_destroy(): properly close syslog

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Wed Sep 9 11:40:45 UTC 2020


fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/20043 )

Change subject: logging: fix log_target_destroy(): properly close syslog
......................................................................

logging: fix log_target_destroy(): properly close syslog

Change-Id: I122445e8ee842b5f807d21a272520648660e7e65
---
M src/logging.c
1 file changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/src/logging.c b/src/logging.c
index 78abc19..80ff72c 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -39,6 +39,11 @@
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
+
+#ifdef HAVE_SYSLOG_H
+#include <syslog.h>
+#endif
+
 #include <time.h>
 #include <sys/time.h>
 #include <errno.h>
@@ -964,6 +969,11 @@
 		fclose(target->tgt_file.out);
 		target->tgt_file.out = NULL;
 		break;
+#ifdef HAVE_SYSLOG_H
+	case LOG_TGT_TYPE_SYSLOG:
+		closelog();
+		break;
+#endif /* HAVE_SYSLOG_H */
 	default:
 		/* make GCC happy */
 		break;

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/20043
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I122445e8ee842b5f807d21a272520648660e7e65
Gerrit-Change-Number: 20043
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200909/ca98c0b8/attachment.htm>


More information about the gerrit-log mailing list