commit ec35b157495c79cf79572fdca4b369f37d42e2bf
Author: Andrew Beekhof <andrew@beekhof.net>
Date: Thu Oct 31 14:04:21 2013 +1100
Fix: crm_resource: Wait for the correct number of replies when cleaning up resources
(cherry picked from commit 145c782e432d8108ca865f994640cf5a62406363)
diff --git a/tools/crm_resource.c b/tools/crm_resource.c
index 1fcb2a2..c344997 100644
--- a/tools/crm_resource.c
+++ b/tools/crm_resource.c
@@ -61,7 +61,7 @@ char *our_pid = NULL;
crm_ipc_t *crmd_channel = NULL;
char *xml_file = NULL;
int cib_options = cib_sync_call;
-int crmd_replies_needed = 0;
+int crmd_replies_needed = 1; /* The welcome message */
GMainLoop *mainloop = NULL;
extern void cleanup_alloc_calculations(pe_working_set_t * data_set);
@@ -93,7 +93,6 @@ static void
start_mainloop(void)
{
mainloop = g_main_new(FALSE);
- crmd_replies_needed++; /* The welcome message */
fprintf(stderr, "Waiting for %d replies from the CRMd", crmd_replies_needed);
crm_debug("Waiting for %d replies from the CRMd", crmd_replies_needed);