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

Function read_events

lrmd/test.c:121–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121static void
122read_events(lrmd_event_data_t * event)
123{
124 report_event(event);
125 if (options.listen) {
126 if (safe_str_eq(options.listen, event_buf_v0)) {
127 print_result(printf("LISTEN EVENT SUCCESSFUL\n"));
128 test_exit(0);
129 }
130 }
131
132 if (exec_call_id && (event->call_id == exec_call_id)) {
133 if (event->op_status == 0 && event->rc == 0) {
134 print_result(printf("API-CALL SUCCESSFUL for 'exec'\n"));
135 } else {
136 print_result(printf("API-CALL FAILURE for 'exec', rc:%d lrmd_op_status:%s\n",
137 event->rc, services_lrm_status_str(event->op_status)));
138 test_exit(-1);
139 }
140
141 if (!options.listen) {
142 test_exit(0);
143 }
144 }
145}
146
147static gboolean
148timeout_err(gpointer data)

Callers

nothing calls this directly

Calls 2

test_exitFunction · 0.85
services_lrm_status_strFunction · 0.85

Tested by

no test coverage detected