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

Function cib_diff_notify

cib/notify.c:199–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199void
200cib_diff_notify(int options, const char *client, const char *call_id, const char *op,
201 xmlNode * update, int result, xmlNode * diff)
202{
203 int add_updates = 0;
204 int add_epoch = 0;
205 int add_admin_epoch = 0;
206
207 int del_updates = 0;
208 int del_epoch = 0;
209 int del_admin_epoch = 0;
210
211 int log_level = LOG_DEBUG_2;
212
213 if (diff == NULL) {
214 return;
215 }
216
217 if (result != pcmk_ok) {
218 log_level = LOG_WARNING;
219 }
220
221 cib_diff_version_details(diff, &add_admin_epoch, &add_epoch, &add_updates,
222 &del_admin_epoch, &del_epoch, &del_updates);
223
224 if (add_updates != del_updates) {
225 do_crm_log(log_level,
226 "Update (client: %s%s%s): %d.%d.%d -> %d.%d.%d (%s)",
227 client, call_id ? ", call:" : "", call_id ? call_id : "",
228 del_admin_epoch, del_epoch, del_updates,
229 add_admin_epoch, add_epoch, add_updates, pcmk_strerror(result));
230
231 } else if (diff != NULL) {
232 do_crm_log(log_level,
233 "Local-only Change (client:%s%s%s): %d.%d.%d (%s)",
234 client, call_id ? ", call: " : "", call_id ? call_id : "",
235 add_admin_epoch, add_epoch, add_updates, pcmk_strerror(result));
236 }
237
238 do_cib_notify(options, op, update, result, diff, T_CIB_DIFF_NOTIFY);
239}
240
241void
242do_cib_notify(int options, const char *op, xmlNode * update,

Callers 1

cib_process_commandFunction · 0.85

Calls 3

cib_diff_version_detailsFunction · 0.85
pcmk_strerrorFunction · 0.85
do_cib_notifyFunction · 0.85

Tested by

no test coverage detected