From d5adc0cbc8e2e536760cc06ae463cda6abf7649a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Wed, 12 Jun 2019 16:54:22 +0200 Subject: [PATCH] tests: ipc: fix the no-GLib conditionalizing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In particular, qb_ipcs_rate_limit() needs to be outside the "#ifdef HAVE_GLIB" conditional, since it gets used regardless. This should have been like this as of 28e7259. Signed-off-by: Jan Pokorný --- tests/check_ipc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/check_ipc.c b/tests/check_ipc.c index fb200a8ba..9a9645e34 100644 --- a/tests/check_ipc.c +++ b/tests/check_ipc.c @@ -94,18 +94,18 @@ enum my_msg_ids { }; -#ifdef HAVE_GLIB /* these 2 functions from pacemaker code */ -static gint -conv_prio_libqb2glib(enum qb_loop_priority prio) +static enum qb_ipcs_rate_limit +conv_libqb_prio2ratelimit(enum qb_loop_priority prio) { - gint ret = G_PRIORITY_DEFAULT; + /* this is an inversion of what libqb's qb_ipcs_request_rate_limit does */ + enum qb_ipcs_rate_limit ret = QB_IPCS_RATE_NORMAL; switch (prio) { case QB_LOOP_LOW: - ret = G_PRIORITY_LOW; + ret = QB_IPCS_RATE_SLOW; break; case QB_LOOP_HIGH: - ret = G_PRIORITY_HIGH; + ret = QB_IPCS_RATE_FAST; break; default: qb_log(LOG_DEBUG, "Invalid libqb's loop priority %d," @@ -116,17 +116,17 @@ conv_prio_libqb2glib(enum qb_loop_priority prio) } return ret; } -static enum qb_ipcs_rate_limit -conv_libqb_prio2ratelimit(enum qb_loop_priority prio) +#ifdef HAVE_GLIB +static gint +conv_prio_libqb2glib(enum qb_loop_priority prio) { - /* this is an inversion of what libqb's qb_ipcs_request_rate_limit does */ - enum qb_ipcs_rate_limit ret = QB_IPCS_RATE_NORMAL; + gint ret = G_PRIORITY_DEFAULT; switch (prio) { case QB_LOOP_LOW: - ret = QB_IPCS_RATE_SLOW; + ret = G_PRIORITY_LOW; break; case QB_LOOP_HIGH: - ret = QB_IPCS_RATE_FAST; + ret = G_PRIORITY_HIGH; break; default: qb_log(LOG_DEBUG, "Invalid libqb's loop priority %d,"