Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: ipc: fix the no-GLib conditionalizing #355

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions tests/check_ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,"
Expand All @@ -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,"
Expand Down