* prints the current point of execution in the OpenSIPS script * * @class - optional, string to be printed meaning the class of action (if any) * @action - mandatory, string with the name of action * @msg - mandatory, sip message * @line - line in script */
| 1295 | * @line - line in script |
| 1296 | */ |
| 1297 | void __script_trace(const char *class, const char *action, struct sip_msg *msg, |
| 1298 | const char *file, int line) |
| 1299 | { |
| 1300 | str val; |
| 1301 | |
| 1302 | if (pv_printf_s(msg, &script_trace_elem, &val) != 0) { |
| 1303 | LM_ERR("Failed to evaluate variables\n"); |
| 1304 | return; |
| 1305 | } |
| 1306 | |
| 1307 | /* Also print extra info */ |
| 1308 | if (script_trace_info) { |
| 1309 | LM_GEN1(script_trace_log_level, "[Script Trace][%s:%d][%s][%s %s]"\ |
| 1310 | " -> (%.*s)\n", file, line, script_trace_info, |
| 1311 | class?class:"", action, val.len, val.s); |
| 1312 | } else { |
| 1313 | LM_GEN1(script_trace_log_level, "[Script Trace][%s:%d][%s %s]"\ |
| 1314 | " -> (%.*s)\n", file, line, |
| 1315 | class?class:"", action, val.len, val.s); |
| 1316 | } |
| 1317 | } |
| 1318 | |
| 1319 | /** |
| 1320 | * functions used to populate $params() vars in the route_param structure |
nothing calls this directly
no test coverage detected