MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / bitmask_to_flag_list

Function bitmask_to_flag_list

flags.c:96–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96str bitmask_to_flag_list(enum flag_type type, int bitmask)
97{
98 struct flag_entry *entry;
99 str ret;
100
101#ifdef EXTRA_DEBUG
102 LM_DBG("bitmask -> %u\n", bitmask);
103#endif
104 ret.s = print_buffer;
105 ret.len = 0;
106 for (entry = flag_lists[type]; entry; entry = entry->next) {
107
108 if (bitmask & (1 << entry->bit)) {
109 memcpy(ret.s + ret.len, entry->name.s, entry->name.len);
110 ret.len += entry->name.len;
111
112 ret.s[ret.len++] = FLAG_DELIM;
113 }
114 }
115
116 if (ret.len > 0)
117 ret.len--;
118
119 return ret;
120}
121
122int flag_list_to_bitmask(const str_const *flags, enum flag_type type, char delim,
123 int init_new_flags)

Callers 15

pv_get_flagsFunction · 0.85
pv_get_bflagsFunction · 0.85
get_branch_fieldFunction · 0.85
get_msg_branch_fieldFunction · 0.85
db_insert_ucontactFunction · 0.85
db_update_ucontactFunction · 0.85
mi_add_aor_nodeFunction · 0.85
bin_push_contactFunction · 0.85
cdb_add_ct_updateFunction · 0.85
_pv_get_tm_branch_fieldFunction · 0.85
set_final_update_colsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected