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

Function try_connect

lrmd/test.c:156–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156static void
157try_connect(void)
158{
159 int tries = 10;
160 int i = 0;
161 int rc = 0;
162
163 for (i = 0; i < tries; i++) {
164 rc = lrmd_conn->cmds->connect(lrmd_conn, "lrmd", NULL);
165
166 if (!rc) {
167 crm_info("lrmd client connection established");
168 return;
169 } else {
170 crm_info("lrmd client connection failed");
171 }
172 sleep(1);
173 }
174
175 print_result(printf("API CONNECTION FAILURE\n"));
176 test_exit(-1);
177}
178
179static gboolean
180start_test(gpointer user_data)

Callers 1

start_testFunction · 0.85

Calls 1

test_exitFunction · 0.85

Tested by

no test coverage detected