Module: sems Branch: sayer/1.4-spce2.5 Commit: 31c9662d5c1b6e0c209f2f20dcf027cb4fbc0b8d URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=31c9662d5c1b6e0c209f2f20dcf027cb4fbc0b8d
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Tue Aug 7 14:26:33 2012 +0200 b/f: User-Agent and Max-Forwards headers in authenticated requests thanks to Jon Bonilla for reporting --- core/AmSipDialog.cpp | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp index 1c8f612..a67c93f 100644 --- a/core/AmSipDialog.cpp +++ b/core/AmSipDialog.cpp @@ -1009,12 +1009,6 @@ int AmSipDialog::sendRequest(const string& method, int flags) { string msg,ser_cmd; - string m_hdrs = hdrs; - - if(hdl) - hdl->onSendRequest(method,content_type,body,m_hdrs,flags,cseq); - - rel100OnRequestOut(method, m_hdrs); AmSipRequest req; @@ -1034,10 +1028,9 @@ int AmSipDialog::sendRequest(const string& method, if((method!="BYE")&&(method!="CANCEL")) req.contact = getContactHdr(); + + req.hdrs = hdrs; - if(!m_hdrs.empty()) - req.hdrs = m_hdrs; - if (!(flags&SIP_FLAGS_VERBATIM)) { // add Signature if (AmConfig::Signature.length()) @@ -1054,6 +1047,11 @@ int AmSipDialog::sendRequest(const string& method, req.body = body; } + if(hdl) + hdl->onSendRequest(method,content_type,body,req.hdrs,flags,cseq); + + rel100OnRequestOut(method, req.hdrs); + if (SipCtrlInterface::send(req, next_hop_ip, next_hop_port,outbound_interface)) return -1; _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
