#include "macro.h"
#include "strv.h"
#include "fileio.h"
-#include "socket-util.h"
#include "microhttpd-util.h"
#ifdef HAVE_GNUTLS
if (r < 0)
return log_oom();
} else {
- r = is_dir(arg_output);
+ r = is_dir(arg_output, true);
if (r > 0) {
r = asprintf(&output,
"%s/remote-%s.journal", arg_output, name);
static int add_source(RemoteServer *s, int fd, const char* name) {
RemoteSource *source = NULL;
- char *realname;
+ _cleanup_free_ char *realname = NULL;
int r;
assert(s);
return log_oom();
}
- log_debug("Creating source for fd:%d (%s)", fd, name);
+ log_debug("Creating source for fd:%d (%s)", fd, realname);
r = get_source_for_fd(s, fd, &source);
if (r < 0) {
- log_error("Failed to create source for fd:%d (%s)", fd, name);
+ log_error("Failed to create source for fd:%d (%s)", fd, realname);
return r;
}
assert(source);
if (remoteserver_init(&s) < 0)
return EXIT_FAILURE;
- log_debug("%s running as pid %lu",
- program_invocation_short_name, (unsigned long) getpid());
+ log_debug("%s running as pid "PID_FMT,
+ program_invocation_short_name, getpid());
sd_notify(false,
"READY=1\n"
"STATUS=Processing requests...");