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

Function pv_printf_s

pvar.c:5752–5764  ·  view source on GitHub ↗

IMPORTANT NOTE - even if the function prints and returns a static buffer, it * has built-in support for PV_PRINTF_BUF_NO levels of nesting * (or concurrent usage). If you think it's not enough for you, either use * pv_printf() directly, either increase PV_PRINT_BUF_NO --bogdan */

Source from the content-addressed store, hash-verified

5750 * (or concurrent usage). If you think it's not enough for you, either use
5751 * pv_printf() directly, either increase PV_PRINT_BUF_NO --bogdan */
5752int pv_printf_s(struct sip_msg* msg, pv_elem_p list, str *s)
5753{
5754 static int buf_itr = 0;
5755
5756 if (list->next==0 && list->spec.getf==0) {
5757 *s = list->text;
5758 return 0;
5759 } else {
5760 *s = pv_print_buf[buf_itr];
5761 buf_itr = (buf_itr + 1) % PV_PRINT_BUF_NO;
5762 return pv_printf(msg, list, s->s, &s->len);
5763 }
5764}
5765
5766void pv_spec_free(pv_spec_t *spec)
5767{

Callers 15

get_cmd_fixupsFunction · 0.85
do_actionFunction · 0.85
__script_traceFunction · 0.85
tr_eval_stringFunction · 0.85
get_stat_nameFunction · 0.85
ds_hash_pvarFunction · 0.85
m_storeFunction · 0.85
ensure_file_pathFunction · 0.85
pv_get_ipsec_ctxFunction · 0.85
get_extra_idFunction · 0.85
pv_get_rtpstatFunction · 0.85
pv_get_sql_cached_valueFunction · 0.85

Calls 1

pv_printfFunction · 0.85

Tested by

no test coverage detected