Skip to content
Snippets Groups Projects
Verified Commit 71adea77 authored by r0hit05's avatar r0hit05 Committed by Nicolas Werner
Browse files

Added checks for voip struct CallCandidates

parent e0e2759f
Branches pushrules
No related tags found
No related merge requests found
......@@ -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