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,"