MCPcopy Create free account
hub / github.com/corosync/corosync / icmap_get_ref_r

Function icmap_get_ref_r

exec/icmap.c:663–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661}
662
663static cs_error_t icmap_get_ref_r(
664 const icmap_map_t map,
665 const char *key_name,
666 void **value,
667 size_t *value_len,
668 icmap_value_types_t *type)
669{
670 struct icmap_item *item;
671
672 if (key_name == NULL) {
673 return (CS_ERR_INVALID_PARAM);
674 }
675
676 item = qb_map_get(map->qb_map, key_name);
677 if (item == NULL) {
678 return (CS_ERR_NOT_EXIST);
679 }
680
681 if (type != NULL) {
682 *type = item->type;
683 }
684
685 if (value_len != NULL) {
686 *value_len = item->value_len;
687 }
688
689 if (value != NULL) {
690 *value = item->value;
691 }
692
693 return (CS_OK);
694}
695
696cs_error_t icmap_get_r(
697 const icmap_map_t map,

Callers 2

icmap_get_rFunction · 0.85
icmap_copy_mapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected