coredump: define a macro for a "short bus call timeout"

I think it would be a good idea to move such fixed, picked values out of
the main sources into the head of a file, to make sure they are
ultimately tunables.
This commit is contained in:
Lennart Poettering 2017-03-01 16:00:47 +01:00
parent b8cda92df5
commit 501551e803
1 changed files with 3 additions and 1 deletions

View File

@ -51,6 +51,8 @@
#include "user-util.h"
#include "util.h"
#define SHORT_BUS_CALL_TIMEOUT_USEC (3 * USEC_PER_SEC)
static usec_t arg_since = USEC_INFINITY, arg_until = USEC_INFINITY;
static enum {
@ -992,7 +994,7 @@ static int check_units_active(void) {
if (r < 0)
return bus_log_create_error(r);
r = sd_bus_call(bus, m, 3 * USEC_PER_SEC, &error, &reply);
r = sd_bus_call(bus, m, SHORT_BUS_CALL_TIMEOUT_USEC, &error, &reply);
if (r < 0)
return log_error_errno(r, "Failed to check if any systemd-coredump@.service units are running: %s",
bus_error_message(&error, r));