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

Function pv_get_sintval

pvar.c:182–198  ·  view source on GitHub ↗

* convert signed int to pv_value_t */

Source from the content-addressed store, hash-verified

180 * convert signed int to pv_value_t
181 */
182int pv_get_sintval(struct sip_msg *msg, pv_param_t *param,
183 pv_value_t *res, int sival)
184{
185 int l = 0;
186 char *ch = NULL;
187
188 if(res==NULL)
189 return -1;
190
191 ch = sint2str(sival, &l);
192 res->rs.s = ch;
193 res->rs.len = l;
194
195 res->ri = sival;
196 res->flags = PV_VAL_STR|PV_VAL_INT|PV_TYPE_INT;
197 return 0;
198}
199
200/**
201 * convert str to pv_value_t

Callers 10

pv_get_sdp_stream_idxFunction · 0.85
pv_get_pidFunction · 0.85
pv_get_return_codeFunction · 0.85
pv_get_ru_qFunction · 0.85
pv_get_errinfo_attrFunction · 0.85
pv_get_timeFunction · 0.85
bm_get_time_diffFunction · 0.85
jsonrpc_handle_cmdFunction · 0.85
pv_handle_rtpstatFunction · 0.85
pv_get_mq_sizeFunction · 0.85

Calls 1

sint2strFunction · 0.85

Tested by

no test coverage detected