| 799 | } |
| 800 | |
| 801 | gboolean |
| 802 | init_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 | |
| 827 | gboolean |
| 828 | init_cs_connection_once(crm_cluster_t *cluster) |
nothing calls this directly
no test coverage detected