summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-03-01 16:00:47 +0100
committerLennart Poettering <lennart@poettering.net>2017-03-01 18:13:00 +0100
commit501551e80315b1e50391dbc958bc2c8dcda7cf98 (patch)
treec197bb2542370b068c85ff3f0ec5db2ab686f669
parentb8cda92df500693e73655c221afd316522e0746d (diff)
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.
-rw-r--r--src/coredump/coredumpctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c
index bffb3d458f..114a13fc78 100644
--- a/src/coredump/coredumpctl.c
+++ b/src/coredump/coredumpctl.c
@@ -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));