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

Function xdbg

xlog.c:346–370  ·  view source on GitHub ↗

*/

Source from the content-addressed store, hash-verified

344/**
345 */
346int xdbg(struct sip_msg* msg, char* frm)
347{
348 int log_len, ret;
349
350 if(!is_xlog_printable(L_DBG))
351 return 1;
352
353 log_len = xlog_buf_size;
354
355 ret = xl_print_log(msg, (pv_elem_t*)(void*)frm, &log_len);
356 if (ret == -1) {
357 LM_ERR("global print buffer too small, increase 'xlog_buf_size'\n");
358 return -1;
359 }
360
361 /* set the xlog as log level to trick "LM_GEN" */
362 set_proc_log_level( *xlog_level );
363
364 /* log_buf[log_len] = '\0'; */
365 LM_GEN1(L_DBG, "%.*s", log_len, log_buf);
366
367 reset_proc_log_level();
368
369 return ret;
370}
371
372int pv_parse_color_name(pv_spec_p sp, const str *in)
373{

Callers 1

do_actionFunction · 0.85

Calls 3

xl_print_logFunction · 0.85
set_proc_log_levelFunction · 0.85
reset_proc_log_levelFunction · 0.85

Tested by

no test coverage detected