Skip to content

Commit 803d924

Browse files
jnpkrnchrissie-c
authored andcommitted
log: journal: fix forgotten syslog reload when flipped from journal
Signed-off-by: Jan Pokorný <[email protected]>
1 parent 2baa279 commit 803d924

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

lib/ipc_socket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ qb_ipc_dgram_sock_setup(const char *base_name,
108108
sizeof(local_address));
109109

110110
if (use_filesystem_sockets()) {
111-
chmod(local_address.sun_path, 0660);
112-
chown(local_address.sun_path, -1, gid);
111+
(void)chmod(local_address.sun_path, 0660);
112+
(void)chown(local_address.sun_path, -1, gid);
113113
}
114114
if (res < 0) {
115115
goto error_connect;

lib/log.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,7 @@ qb_log_ctl2(int32_t t, enum qb_log_conf c, qb_log_ctl2_arg_t arg_not4directuse)
11031103
#ifdef USE_JOURNAL
11041104
if (t == QB_LOG_SYSLOG) {
11051105
conf[t].use_journal = arg_i32;
1106+
need_reload = QB_TRUE;
11061107
} else {
11071108
rc = -EINVAL;
11081109
}

lib/log_syslog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ _syslog_reload(int32_t target)
9797
{
9898
struct qb_log_target *t = qb_log_target_get(target);
9999

100+
closelog();
100101
if (!t->use_journal) {
101-
closelog();
102102
openlog(t->name, LOG_PID, t->facility);
103103
}
104104
}

0 commit comments

Comments
 (0)