mirror of
https://github.com/resiprocate/resiprocate.git
synced 2026-01-12 00:05:02 +08:00
Fix a runtime access violation in tfdum
This commit is contained in:
@@ -145,7 +145,7 @@ StunEndPoint::generateBindingResponse(const Uri& mappedAddress)
|
||||
{
|
||||
return new CommonAction(this,
|
||||
"Generate Binding Response",
|
||||
[&] { generateBindingResponseDelegate(mappedAddress); });
|
||||
[=] { generateBindingResponseDelegate(mappedAddress); });
|
||||
}
|
||||
|
||||
ActionBase*
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
//#include "tfm/tfdum/DumEvent.hxx"
|
||||
//#include "rutil/Logger.hxx"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#define RESIPROCATE_SUBSYSTEM resip::Subsystem::TEST
|
||||
|
||||
using namespace resip;
|
||||
@@ -62,14 +64,14 @@ Shutdown::operator()(DumUserAgent& dua)
|
||||
|
||||
DumUaSendingCommand::DumUaSendingCommand(DumUserAgent* dua, Functor func) :
|
||||
DumUaAction(dua),
|
||||
mFunctor(func),
|
||||
mMessageAdorner(0)
|
||||
mFunctor(std::move(func)),
|
||||
mMessageAdorner(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
DumUaSendingCommand::DumUaSendingCommand(DumUserAgent* dua, Functor func, MessageAdorner* adorner) :
|
||||
DumUaAction(dua),
|
||||
mFunctor(func),
|
||||
mFunctor(std::move(func)),
|
||||
mMessageAdorner(adorner)
|
||||
{
|
||||
}
|
||||
@@ -83,11 +85,11 @@ void
|
||||
DumUaSendingCommand::operator()(DumUserAgent& dua)
|
||||
{
|
||||
dua.getDum().post(new DumUaSendingCommandCommand(dua.getDum(), mFunctor, mMessageAdorner));
|
||||
mMessageAdorner=0;
|
||||
mMessageAdorner = nullptr;
|
||||
}
|
||||
|
||||
DumUaSendingCommandCommand::DumUaSendingCommandCommand(resip::DialogUsageManager& dum, Functor func, MessageAdorner* adorn) :
|
||||
mFunctor(func),
|
||||
mFunctor(std::move(func)),
|
||||
mMessageAdorner(adorn),
|
||||
mDum(dum)
|
||||
{}
|
||||
@@ -120,7 +122,7 @@ DumUaSendingCommandCommand::executeCommand()
|
||||
|
||||
DumUaCommand::DumUaCommand(DumUserAgent* dua, Functor func) :
|
||||
DumUaAction(dua),
|
||||
mFunctor(func)
|
||||
mFunctor(std::move(func))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -387,7 +387,7 @@ DumUserAgent::inviteFromRefer(const resip::SipMessage& refer,
|
||||
resip::DialogUsageManager::EncryptionLevel level,
|
||||
const resip::SdpContents* alternative)
|
||||
{
|
||||
return new DumUaSendingCommand(this, [&] { return mDum->makeInviteSessionFromRefer(refer, h, initialOffer, level, alternative, nullptr); });
|
||||
return new DumUaSendingCommand(this, [=, &refer, &h] { return mDum->makeInviteSessionFromRefer(refer, h, initialOffer, level, alternative, nullptr); });
|
||||
}
|
||||
|
||||
DumUaAction*
|
||||
@@ -400,7 +400,7 @@ DumUaAction*
|
||||
DumUserAgent::publish(const resip::NameAddr& target, const resip::Contents& body,
|
||||
const resip::Data& eventType, unsigned expiresSeconds)
|
||||
{
|
||||
return new DumUaSendingCommand(this, [&] { return mDum->makePublication(target, body, eventType, expiresSeconds, nullptr); });
|
||||
return new DumUaSendingCommand(this, [=, &body] { return mDum->makePublication(target, body, eventType, expiresSeconds, nullptr); });
|
||||
}
|
||||
|
||||
DumUaAction*
|
||||
|
||||
@@ -24,7 +24,7 @@ TestClientPagerMessage::TestClientPagerMessage(DumUserAgent* ua, ClientPagerMess
|
||||
CommonAction*
|
||||
TestClientPagerMessage::page(std::unique_ptr<resip::Contents>& contents, resip::DialogUsageManager::EncryptionLevel level)
|
||||
{
|
||||
return new CommonAction(mUa, "page", [&] { mHandle->page(std::move(contents), level); });
|
||||
return new CommonAction(mUa, "page", [=, &contents] { mHandle->page(std::move(contents), level); });
|
||||
}
|
||||
|
||||
CommonAction*
|
||||
|
||||
Reference in New Issue
Block a user