Ovidiu Sas writes:
I forgot to reply to you that I added that warning in
the code for the
same reason.
What do you mean by a parameter that disables looking for the socket?
hi ovidiu,
the piece of code currently looks like this:
if (enable_double_rr && is_2rr(&puri.params)) {
/* double route may occure due different IP and port, so force as
* send interface the one advertise in second Route */
if (parse_uri(rt->nameaddr.uri.s,rt->nameaddr.uri.len,&puri)<0) {
LM_ERR("failed to parse the double route URI\n");
return RR_ERROR;
}
si = grep_sock_info( &puri.host, puri.port_no, puri.proto);
if (si) {
set_force_socket(_m, si);
} else {
if (enable_socket_mismatch_warning)f
LM_WARN("no socket found for match second RR\n");
}
when the "disable socket check" parameter would have been given either
globally or per loose_route() call, then this part of the code would not
be executed at all:
si = grep_sock_info( &puri.host, puri.port_no, puri.proto);
if (si) {
set_force_socket(_m, si);
} else {
if (enable_socket_mismatch_warning)f
LM_WARN("no socket found for match second RR\n");
}
which would save some cpu cycles.
-- juha