| 1118 | } |
| 1119 | |
| 1120 | gint |
| 1121 | cib_GCompareFunc(gconstpointer a, gconstpointer b) |
| 1122 | { |
| 1123 | const xmlNode *a_msg = a; |
| 1124 | const xmlNode *b_msg = b; |
| 1125 | |
| 1126 | int msg_a_id = 0; |
| 1127 | int msg_b_id = 0; |
| 1128 | const char *value = NULL; |
| 1129 | |
| 1130 | value = crm_element_value_const(a_msg, F_CIB_CALLID); |
| 1131 | msg_a_id = crm_parse_int(value, NULL); |
| 1132 | |
| 1133 | value = crm_element_value_const(b_msg, F_CIB_CALLID); |
| 1134 | msg_b_id = crm_parse_int(value, NULL); |
| 1135 | |
| 1136 | if (msg_a_id == msg_b_id) { |
| 1137 | return 0; |
| 1138 | } else if (msg_a_id < msg_b_id) { |
| 1139 | return -1; |
| 1140 | } |
| 1141 | return 1; |
| 1142 | } |
| 1143 | |
| 1144 | #if SUPPORT_HEARTBEAT |
| 1145 | void |
nothing calls this directly
no test coverage detected