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

Function pv_get_uintval

pvar.c:161–177  ·  view source on GitHub ↗

helper functions ********/ * convert unsigned int to pv_value_t */

Source from the content-addressed store, hash-verified

159 * convert unsigned int to pv_value_t
160 */
161int pv_get_uintval(struct sip_msg *msg, pv_param_t *param,
162 pv_value_t *res, unsigned int uival)
163{
164 int l = 0;
165 char *ch = NULL;
166
167 if(res==NULL)
168 return -1;
169
170 ch = int2str(uival, &l);
171 res->rs.s = ch;
172 res->rs.len = l;
173
174 res->ri = (int)uival;
175 res->flags = PV_VAL_STR|PV_VAL_INT|PV_TYPE_INT;
176 return 0;
177}
178
179/**
180 * convert signed int to pv_value_t

Callers 11

pv_get_timesFunction · 0.85
pv_get_timemFunction · 0.85
pv_get_start_timesFunction · 0.85
pv_get_msgidFunction · 0.85
pv_get_xuri_attrFunction · 0.85
pv_get_msg_lenFunction · 0.85
pv_get_srcportFunction · 0.85
pv_get_dsturi_attrFunction · 0.85
pv_get_hdrcntFunction · 0.85
pv_get_timeFunction · 0.85
pv_get_rl_countFunction · 0.85

Calls 1

int2strFunction · 0.85

Tested by

no test coverage detected