Skip to content
Snippets Groups Projects
Unverified Commit 36f58236 authored by Nicolas Werner's avatar Nicolas Werner Committed by GitHub
Browse files

Merge pull request #82 from r0hit05/msc2746

Added checks for VoIP struct CallCandidates
parents e0e2759f 664f462b
No related branches found
No related tags found
No related merge requests found
Pipeline #3785 failed
......@@ -79,9 +79,12 @@ to_json(json &obj, const CallInvite &content)
void
from_json(const json &obj, CallCandidates::Candidate &content)
{
content.sdpMid = obj.at("sdpMid").get<std::string>();
content.sdpMLineIndex = obj.at("sdpMLineIndex").get<uint16_t>();
content.candidate = obj.at("candidate").get<std::string>();
if (obj.contains("sdpMid"))
content.sdpMid = obj.at("sdpMid").get<std::string>();
if (obj.contains("sdpMLineIndex"))
content.sdpMLineIndex = obj.at("sdpMLineIndex").get<uint16_t>();
if (obj.contains("candidate"))
content.candidate = obj.at("candidate").get<std::string>();
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment