Module: sems Branch: master Commit: c6aae71f42b22f37ad107685ec5b3f155395d9d0 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=c6aae71f42b22f37ad107685ec5b3f155395d9d0
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Fri Feb 24 11:01:03 2012 +0100 b/f: align UACAuth::onSendRequest() to the current API. --- core/plug-in/uac_auth/UACAuth.cpp | 24 ++++++++++-------------- core/plug-in/uac_auth/UACAuth.h | 7 +------ 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/core/plug-in/uac_auth/UACAuth.cpp b/core/plug-in/uac_auth/UACAuth.cpp index f31c180..c933e88 100644 --- a/core/plug-in/uac_auth/UACAuth.cpp +++ b/core/plug-in/uac_auth/UACAuth.cpp @@ -219,34 +219,30 @@ bool UACAuth::onSipReply(const AmSipReply& reply, AmSipDialog::Status old_dlg_st return processed; } -bool UACAuth::onSendRequest(const string& method, - const AmMimeBody* body, - string& hdrs, - int flags, - unsigned int cseq) +bool UACAuth::onSendRequest(AmSipRequest& req, int flags) { // add authentication header if nonce is already there string result; if (!(flags & SIP_FLAGS_NOAUTH) && !challenge.nonce.empty() && do_auth(challenge, challenge_code, - method, dlg->remote_uri, body, result)) { + req.method, dlg->remote_uri, &req.body, result)) { // add headers - if (hdrs == "\r\n" || hdrs == "\r" || hdrs == "\n") - hdrs = result; + if (req.hdrs == "\r\n" || req.hdrs == "\r" || req.hdrs == "\n") + req.hdrs = result; else - hdrs += result; + req.hdrs += result; nonce_reuse = true; } else { nonce_reuse = false; } - DBG("adding %d to list of sent requests.\n", cseq); - sent_requests[cseq] = SIPRequestInfo(method, - body, - hdrs, - dlg->getOAState()); + DBG("adding %d to list of sent requests.\n", req.cseq); + sent_requests[req.cseq] = SIPRequestInfo(req.method, + &req.body, + req.hdrs, + dlg->getOAState()); return false; } diff --git a/core/plug-in/uac_auth/UACAuth.h b/core/plug-in/uac_auth/UACAuth.h index 403ec28..101d67e5 100644 --- a/core/plug-in/uac_auth/UACAuth.h +++ b/core/plug-in/uac_auth/UACAuth.h @@ -159,12 +159,7 @@ class UACAuth : public AmSessionEventHandler virtual bool onSipRequest(const AmSipRequest&); virtual bool onSipReply(const AmSipReply&, AmSipDialog::Status old_dlg_status); - virtual bool onSendRequest(const string& method, - const AmMimeBody* body, - string& hdrs, - int flags, - unsigned int cseq); - + virtual bool onSendRequest(AmSipRequest& req, int flags); virtual bool onSendReply(AmSipReply& reply, int flags); }; _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
