Memory leak when using $T_reply_code in base onreply_route ( not named onreply_route, so t_on_reply was not used)
Opensips 1.8.2 from source tar.
Reproduced consistently on both CentOS 5.8 and CentOS 6.3
pertinent part of script when memory leak:
onreply_route {
if ( $T_reply_code =~ "^18." )
$var(r_type) = "Ring";
else if ( $T_reply_code == "200" )
$var(r_type) = "Answer";
else
$var(r_type) = "Other";
xlog("L_ERR","Reply $var(r_type) $T_reply_code rm $rm si $si cid'$ci'\n");
}
Using $rs instead of $T_reply_code made it work. Also, naming the reply route and setting t_on_reply to it also solved the memory leak.
onreply_route {
if ( $rs == "100" ){
xlog("L_INFO", "Reply $rs rm $rm si $si cid '$ci'\n");
exit;
} else if ( $rs =~ "18." )
$var(r_type) = "Ring";
else if ( $rs == "200" )
$var(r_type) = "Answer";
else
$var(r_type) = "Other";
xlog("L_ERR","Reply type $var(r_type) $rs $rr rm $rm si $si via $(hdr(Via)[1]{via.host}) cid'$ci'\n");
#route(reply_logging);
}
Hi,
How the leak was observed ? was it pkg or shm memory ? do you have mem dumps to show the actual leak ?
Regards,
Bogdan
Could you provide a memory dump or so ? I cannot reproduce this.
Any updates here ?