From 0abcd469f5ee43bc908922e6994d80107d6ac462 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Fri, 9 Jun 2017 11:11:12 -0500
Subject: [PATCH] Refactor: libcrmcommon: rename queue backlog structure member
will be more consistent with future changes
---
include/crm/common/ipcs.h | 2 +-
lib/common/ipc.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/crm/common/ipcs.h b/include/crm/common/ipcs.h
index 06cade9..52338e3 100644
--- a/include/crm/common/ipcs.h
+++ b/include/crm/common/ipcs.h
@@ -93,7 +93,7 @@ struct crm_client_s {
struct crm_remote_s *remote; /* TCP/TLS */
- unsigned int backlog_len; /* IPC queue length after last flush */
+ unsigned int queue_backlog; /* IPC queue length after last flush */
};
extern GHashTable *client_connections;
diff --git a/lib/common/ipc.c b/lib/common/ipc.c
index efe6480..50980ec 100644
--- a/lib/common/ipc.c
+++ b/lib/common/ipc.c
@@ -558,25 +558,25 @@ crm_ipcs_flush_events(crm_client_t * c)
*/
if (queue_len > PCMK_IPC_MAX_QUEUE) {
- if ((c->backlog_len <= 1) || (queue_len < c->backlog_len)) {
+ if ((c->queue_backlog <= 1) || (queue_len < c->queue_backlog)) {
/* Don't evict for a new or shrinking backlog */
crm_warn("Client with process ID %u has a backlog of %u messages "
CRM_XS " %p", c->pid, queue_len, c->ipcs);
} else {
crm_err("Evicting client with process ID %u due to backlog of %u messages "
CRM_XS " %p", c->pid, queue_len, c->ipcs);
- c->backlog_len = 0;
+ c->queue_backlog = 0;
qb_ipcs_disconnect(c->ipcs);
return rc;
}
}
- c->backlog_len = queue_len;
+ c->queue_backlog = queue_len;
delay_next_flush(c, queue_len);
} else {
/* Event queue is empty, there is no backlog */
- c->backlog_len = 0;
+ c->queue_backlog = 0;
}
return rc;
--
1.8.3.1