summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/spoolssd.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source3/printing/spoolssd.c b/source3/printing/spoolssd.c
index 0ba0a95435..899a1f3530 100644
--- a/source3/printing/spoolssd.c
+++ b/source3/printing/spoolssd.c
@@ -25,17 +25,19 @@
#include "rpc_server/rpc_server.h"
#define SPOOLSS_PIPE_NAME "spoolss"
-
+#define DAEMON_NAME "spoolssd"
static void spoolss_reopen_logs(void)
{
- char *lfile = NULL;
- int ret;
-
- ret = asprintf(&lfile, "%s.spoolssd", lp_logfile());
- if (ret > 0) {
- lp_set_logfile(lfile);
- SAFE_FREE(lfile);
+ char *lfile = lp_logfile();
+ int rc;
+
+ if (strstr(lfile, DAEMON_NAME) == NULL) {
+ rc = asprintf(&lfile, "%s.%s", lp_logfile(), DAEMON_NAME);
+ if (rc > 0) {
+ lp_set_logfile(lfile);
+ SAFE_FREE(lfile);
+ }
}
reopen_logs();
}