TT#89352 return proper ICE candidate parsing result

Change-Id: I6bdd5db074eae0dccb86bb50d1370154bb024bf2
pull/1346/head
Richard Fuchs 5 years ago
parent 3a63929ca1
commit f2f45a0836

@ -702,6 +702,9 @@ static int parse_attribute_candidate(struct sdp_attribute *output, bool extended
return 0;
}
// 0 = success
// -1 = error
// 1 = parsed ok but unsupported candidate type
int sdp_parse_candidate(struct ice_candidate *cand, const str *s) {
struct sdp_attribute attr = {
.value = *s,
@ -710,7 +713,7 @@ int sdp_parse_candidate(struct ice_candidate *cand, const str *s) {
if (parse_attribute_candidate(&attr, true))
return -1;
if (!attr.u.candidate.parsed)
return -1;
return 1;
*cand = attr.u.candidate.cand_parsed;
return 0;

@ -28,7 +28,7 @@ int sdp_replace(struct sdp_chopper *, GQueue *, struct call_monologue *, struct
int sdp_is_duplicate(GQueue *sessions);
int sdp_create(str *out, struct call_monologue *, struct sdp_ng_flags *flags);
int sdp_parse_candidate(struct ice_candidate *cand, const str *s);
int sdp_parse_candidate(struct ice_candidate *cand, const str *s); // returns -1, 0, 1
struct sdp_chopper *sdp_chopper_new(str *input);
void sdp_chopper_destroy(struct sdp_chopper *chop);

Loading…
Cancel
Save