From 765ef886b9e142a2211185450303d9b0148e62ec Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 28 Jan 2026 09:00:33 -0400 Subject: [PATCH] MT#62181 convert arg to string Change-Id: I509d03ef85709ec664d473f2fe80f4bc190b62cb --- core/sip/trans_layer.cpp | 14 +++++++------- core/sip/trans_layer.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/sip/trans_layer.cpp b/core/sip/trans_layer.cpp index ca652585..fa118bdf 100644 --- a/core/sip/trans_layer.cpp +++ b/core/sip/trans_layer.cpp @@ -111,7 +111,7 @@ void trans_layer::clear_transports() transports.clear(); } -int trans_layer::set_trsp_socket(sip_msg* msg, const cstring& next_trsp, +int trans_layer::set_trsp_socket(sip_msg* msg, const string& next_trsp, int out_interface) { if((out_interface < 0) @@ -130,12 +130,12 @@ int trans_layer::set_trsp_socket(sip_msg* msg, const cstring& next_trsp, } prot_collection::iterator prot_sock_it = - transports[out_interface].find(c2stlstr(next_trsp)); + transports[out_interface].find(next_trsp); if(prot_sock_it == transports[out_interface].end()) { - DBG("could not find transport '%.*s' in outbound interface %i", - next_trsp.len,next_trsp.s,out_interface); + DBG("could not find transport '%s' in outbound interface %i", + next_trsp.c_str(), out_interface); prot_sock_it = transports[out_interface].find("udp"); @@ -1279,7 +1279,7 @@ int trans_layer::send_request(sip_msg* msg, trans_ticket* tt, return 0; } - if(set_trsp_socket(msg, stl2cstr(next_trsp), out_interface) < 0) + if(set_trsp_socket(msg, next_trsp, out_interface) < 0) return -1; if((flags & TR_FLAG_NEXT_HOP_RURI) && @@ -2652,7 +2652,7 @@ int trans_layer::try_next_ip(trans_bucket* bucket, sip_trans* tr, int out_interface = tmp_msg.local_socket->get_if(); tmp_msg.local_socket = NULL; - if(set_trsp_socket(&tmp_msg, stl2cstr(next_trsp), out_interface) < 0) + if(set_trsp_socket(&tmp_msg, next_trsp, out_interface) < 0) return -1; if(n_tr->flags & TR_FLAG_NEXT_HOP_RURI) { @@ -2698,7 +2698,7 @@ int trans_layer::try_next_ip(trans_bucket* bucket, sip_trans* tr, auto old_sock = tr->msg->local_socket; int out_interface = old_sock->get_if(); - if(set_trsp_socket(tr->msg, stl2cstr(next_trsp), out_interface) < 0) + if(set_trsp_socket(tr->msg, next_trsp, out_interface) < 0) return -1; if(tr->flags & TR_FLAG_NEXT_HOP_RURI) { diff --git a/core/sip/trans_layer.h b/core/sip/trans_layer.h index d7328cb6..737febb2 100644 --- a/core/sip/trans_layer.h +++ b/core/sip/trans_layer.h @@ -265,7 +265,7 @@ protected: * transport and interface. If out_interface == -1, * we will try hard to find an interface based on msg->remote_ip. */ - int set_trsp_socket(sip_msg* msg, const cstring& next_trsp, + int set_trsp_socket(sip_msg* msg, const string& next_trsp, int out_interface); sip_trans* copy_uac_trans(sip_trans* tr);