chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
path-util: fix path_is_mount_point() for symlinks
[elogind.git]
/
src
/
journal-remote
/
journal-remote.c
diff --git
a/src/journal-remote/journal-remote.c
b/src/journal-remote/journal-remote.c
index 6ec5ad2e77a2f152c4c488f5adcbeb9f5856834c..ba811e0333749e2466889aa330daf163f16158ee 100644
(file)
--- a/
src/journal-remote/journal-remote.c
+++ b/
src/journal-remote/journal-remote.c
@@
-26,8
+26,6
@@
#include <string.h>
#include <sys/prctl.h>
#include <sys/socket.h>
#include <string.h>
#include <sys/prctl.h>
#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/types.h>
#include <unistd.h>
#include <getopt.h>
#include <unistd.h>
#include <getopt.h>
@@
-35,13
+33,11
@@
#include "journal-file.h"
#include "journald-native.h"
#include "socket-util.h"
#include "journal-file.h"
#include "journald-native.h"
#include "socket-util.h"
-#include "mkdir.h"
#include "build.h"
#include "macro.h"
#include "strv.h"
#include "fileio.h"
#include "conf-parser.h"
#include "build.h"
#include "macro.h"
#include "strv.h"
#include "fileio.h"
#include "conf-parser.h"
-#include "siphash24.h"
#ifdef HAVE_GNUTLS
#include <gnutls/gnutls.h>
#ifdef HAVE_GNUTLS
#include <gnutls/gnutls.h>
@@
-406,7
+402,7
@@
static int add_source(RemoteServer *s, int fd, char* name, bool own_name) {
static int add_raw_socket(RemoteServer *s, int fd) {
int r;
_cleanup_close_ int fd_ = fd;
static int add_raw_socket(RemoteServer *s, int fd) {
int r;
_cleanup_close_ int fd_ = fd;
- char name[s
trlen("raw-socket-") + DECIMAL_STR_MAX(int)
];
+ char name[s
izeof("raw-socket-")-1 + DECIMAL_STR_MAX(int) + 1
];
assert(fd >= 0);
assert(fd >= 0);
@@
-416,7
+412,7
@@
static int add_raw_socket(RemoteServer *s, int fd) {
if (r < 0)
return r;
if (r < 0)
return r;
-
snprintf(name, sizeof(name)
, "raw-socket-%d", fd);
+
xsprintf(name
, "raw-socket-%d", fd);
r = sd_event_source_set_description(s->listen_event, name);
if (r < 0)
r = sd_event_source_set_description(s->listen_event, name);
if (r < 0)
@@
-885,7
+881,7
@@
static int remoteserver_init(RemoteServer *s,
if (arg_url) {
const char *url, *hostname;
if (arg_url) {
const char *url, *hostname;
- url = str
append
a(arg_url, "/entries");
+ url = str
join
a(arg_url, "/entries");
if (arg_getter) {
log_info("Spawning getter %s...", url);
if (arg_getter) {
log_info("Spawning getter %s...", url);
@@
-1021,7
+1017,7
@@
static int dispatch_raw_source_event(sd_event_source *event,
if (remaining > 0)
log_warning("Premature EOF. %zu bytes lost.", remaining);
remove_source(s, source->fd);
if (remaining > 0)
log_warning("Premature EOF. %zu bytes lost.", remaining);
remove_source(s, source->fd);
- log_info("%z
d
active sources remaining", s->active);
+ log_info("%z
u
active sources remaining", s->active);
return 0;
} else if (r == -E2BIG) {
log_error("Entry too big, skipped");
return 0;
} else if (r == -E2BIG) {
log_error("Entry too big, skipped");
@@
-1469,13
+1465,13
@@
static int setup_gnutls_logger(char **categories) {
gnutls_global_set_log_function(log_func_gnutls);
gnutls_global_set_log_function(log_func_gnutls);
- if (categories)
+ if (categories)
{
STRV_FOREACH(cat, categories) {
r = log_enable_gnutls_category(*cat);
if (r < 0)
return r;
}
STRV_FOREACH(cat, categories) {
r = log_enable_gnutls_category(*cat);
if (r < 0)
return r;
}
- else
+
}
else
log_reset_gnutls_level();
}
#endif
log_reset_gnutls_level();
}
#endif