X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/45ccc5c08c0765171721211e8e97c1ccf3db6978..f855d1a309f38301bcd8898e9fbc5c70133d1f98:/log.c diff --git a/log.c b/log.c index ebf796b6..068b5a93 100644 --- a/log.c +++ b/log.c @@ -37,7 +37,8 @@ void rprintf(int fd, const char *format, ...) #if HAVE_VSNPRINTF len = vsnprintf(buf, sizeof(buf)-1, format, ap); #else - len = vsprintf(buf, format, ap); + vsprintf(buf, format, ap); + len = strlen(buf); #endif va_end(ap); @@ -55,7 +56,7 @@ void rprintf(int fd, const char *format, ...) if (!initialised) { initialised = 1; #ifdef LOG_DAEMON - openlog("rsyncd", LOG_PID, LOG_DAEMON); + openlog("rsyncd", LOG_PID, lp_syslog_facility()); #else openlog("rsyncd", LOG_PID); #endif