- work to fix secure calls problems
This commit is contained in:
parent
616498e8a2
commit
aeedeb0626
|
|
@ -171,7 +171,7 @@ void AgentImpl::processConfig(JsonCpp::Value &d, JsonCpp::Value &answer)
|
|||
#endif
|
||||
|
||||
std::string transport = d["transport"].asString();
|
||||
config()[CONFIG_TRANSPORT] = (transport == "any") ? 0 : (transport == "udp" ? 1 : (transport == "tcp" ? 2 : 3));
|
||||
config()[CONFIG_TRANSPORT] = (transport == "any") ? TransportType_Any : (transport == "udp" ? TransportType_Udp : (transport == "tcp" ? TransportType_Tcp : TransportType_Tls));
|
||||
config()[CONFIG_IPV4] = d["ipv4"].asBool();
|
||||
config()[CONFIG_IPV6] = d["ipv6"].asBool();
|
||||
|
||||
|
|
@ -189,10 +189,12 @@ void AgentImpl::processConfig(JsonCpp::Value &d, JsonCpp::Value &answer)
|
|||
|
||||
mUseNativeAudio = d["nativeaudio"].asBool();
|
||||
config()[CONFIG_OWN_DNS] = d["dns_servers"].asString();
|
||||
config()[CONFIG_SIPS] = d["secure"].asBool();
|
||||
|
||||
answer["status"] = Status_Ok;
|
||||
}
|
||||
|
||||
void AgentImpl::processStart(JsonCpp::Value& /*request*/, JsonCpp::Value &answer)
|
||||
void AgentImpl::processStart(JsonCpp::Value& request, JsonCpp::Value &answer)
|
||||
{
|
||||
std::unique_lock<std::recursive_mutex> l(mAgentMutex);
|
||||
if (mThread)
|
||||
|
|
@ -201,6 +203,9 @@ void AgentImpl::processStart(JsonCpp::Value& /*request*/, JsonCpp::Value &answer
|
|||
return; // Started already
|
||||
}
|
||||
|
||||
// Process config (can be sent via start command as well)
|
||||
// processConfig(request, answer);
|
||||
|
||||
// Start socket thread
|
||||
SocketHeap::instance().start();
|
||||
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ void DevicePair::onSpkData(const Format& f, void* buffer, int length)
|
|||
}
|
||||
}
|
||||
|
||||
assert(mOutputNativeData.filled() >= length);
|
||||
// assert(mOutputNativeData.filled() >= length);
|
||||
#ifdef DUMP_NATIVEOUTPUT
|
||||
if (mNativeOutputDump)
|
||||
mNativeOutputDump->write(mOutputNativeData.data(), length);
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ void UserAgent::start()
|
|||
|
||||
switch (mConfig[CONFIG_TRANSPORT].asInt())
|
||||
{
|
||||
case 0:
|
||||
case TransportType_Any:
|
||||
if (mConfig[CONFIG_IPV4].asBool())
|
||||
{
|
||||
ADD_TRANSPORT4(resip::TCP)
|
||||
|
|
@ -166,21 +166,21 @@ void UserAgent::start()
|
|||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case TransportType_Udp:
|
||||
if (mConfig[CONFIG_IPV4].asBool())
|
||||
ADD_TRANSPORT4(resip::UDP);
|
||||
if (mConfig[CONFIG_IPV6].asBool())
|
||||
ADD_TRANSPORT6(resip::UDP);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case TransportType_Tcp:
|
||||
if (mConfig[CONFIG_IPV4].asBool())
|
||||
ADD_TRANSPORT4(resip::TCP);
|
||||
if (mConfig[CONFIG_IPV6].asBool())
|
||||
ADD_TRANSPORT6(resip::TCP);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case TransportType_Tls:
|
||||
if (mConfig[CONFIG_IPV4].asBool())
|
||||
ADD_TRANSPORT4(resip::TLS);
|
||||
if (mConfig[CONFIG_IPV6].asBool())
|
||||
|
|
|
|||
|
|
@ -60,6 +60,14 @@
|
|||
#define RESIPROCATE_SUBSYSTEM Subsystem::TEST
|
||||
|
||||
using namespace std;
|
||||
enum
|
||||
{
|
||||
TransportType_Any,
|
||||
TransportType_Udp,
|
||||
TransportType_Tcp,
|
||||
TransportType_Tls
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CONFIG_IPV4 = 0, // Use IP4
|
||||
|
|
|
|||
Loading…
Reference in New Issue