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

Function append_digest

lib/common/utils.c:1850–1883  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1848
1849#define FAKE_TE_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1850static void
1851append_digest(lrmd_event_data_t * op, xmlNode * update, const char *version, const char *magic, int level)
1852{
1853 /* this will enable us to later determine that the
1854 * resource's parameters have changed and we should force
1855 * a restart
1856 */
1857 char *digest = NULL;
1858 xmlNode *args_xml = NULL;
1859
1860 if (op->params == NULL) {
1861 return;
1862 }
1863
1864 args_xml = create_xml_node(NULL, XML_TAG_PARAMS);
1865 g_hash_table_foreach(op->params, hash2field, args_xml);
1866 filter_action_parameters(args_xml, version);
1867 digest = calculate_operation_digest(args_xml, version);
1868
1869#if 0
1870 if (level < get_crm_log_level()
1871 && op->interval == 0 && crm_str_eq(op->op_type, CRMD_ACTION_START, TRUE)) {
1872 char *digest_source = dump_xml_unformatted(args_xml);
1873
1874 do_crm_log(level, "Calculated digest %s for %s (%s). Source: %s\n",
1875 digest, ID(update), magic, digest_source);
1876 free(digest_source);
1877 }
1878#endif
1879 crm_xml_add(update, XML_LRM_ATTR_OP_DIGEST, digest);
1880
1881 free_xml(args_xml);
1882 free(digest);
1883}
1884
1885int
1886rsc_op_expected_rc(lrmd_event_data_t * op)

Callers 1

create_operation_updateFunction · 0.85

Calls 8

create_xml_nodeFunction · 0.85
filter_action_parametersFunction · 0.85
get_crm_log_levelFunction · 0.85
crm_str_eqFunction · 0.85
dump_xml_unformattedFunction · 0.85
crm_xml_addFunction · 0.85
free_xmlFunction · 0.85

Tested by

no test coverage detected