Commit 7db69f10 authored by Tristan Matthews's avatar Tristan Matthews

* #9905: SipTransport: address has to stay on stack to be valid

parent d3bb0daf
...@@ -418,7 +418,8 @@ SipTransport::createUdpTransport(const std::string &interface, unsigned int port ...@@ -418,7 +418,8 @@ SipTransport::createUdpTransport(const std::string &interface, unsigned int port
std::ostringstream fullAddress; std::ostringstream fullAddress;
fullAddress << listeningAddress << ":" << listeningPort; fullAddress << listeningAddress << ":" << listeningPort;
pj_str_t udpString; pj_str_t udpString;
pj_cstr(&udpString, fullAddress.str().c_str()); std::string fullAddressStr(fullAddress.str());
pj_cstr(&udpString, fullAddressStr.c_str());
pj_sockaddr boundAddr; pj_sockaddr boundAddr;
pj_sockaddr_parse(pj_AF_UNSPEC(), 0, &udpString, &boundAddr); pj_sockaddr_parse(pj_AF_UNSPEC(), 0, &udpString, &boundAddr);
pj_status_t status; pj_status_t status;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment