MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / init_cs_connection

Function init_cs_connection

lib/cluster/corosync.c:801–825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

799}
800
801gboolean
802init_cs_connection(crm_cluster_t *cluster)
803{
804 int retries = 0;
805
806 while (retries < 5) {
807 int rc = init_cs_connection_once(cluster);
808 retries++;
809
810 switch (rc) {
811 case CS_OK:
812 return TRUE;
813 break;
814 case CS_ERR_TRY_AGAIN:
815 case CS_ERR_QUEUE_FULL:
816 sleep(retries);
817 break;
818 default:
819 return FALSE;
820 }
821 }
822
823 crm_err("Could not connect to corosync after %d retries", retries);
824 return FALSE;
825}
826
827gboolean
828init_cs_connection_once(crm_cluster_t *cluster)

Callers

nothing calls this directly

Calls 1

init_cs_connection_onceFunction · 0.70

Tested by

no test coverage detected