Browse Source

don't just ignore but also strip invalid/unknown a=crypto

possibly fixes #207

Change-Id: I79df1b12ae7b335cd067be9238d76bf61cfb1536
pull/214/head
Richard Fuchs 10 years ago
parent
commit
59260482a1
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      daemon/sdp.c

+ 7
- 2
daemon/sdp.c View File

@ -190,6 +190,7 @@ struct sdp_attribute {
ATTR_FINGERPRINT,
ATTR_SETUP,
ATTR_RTPMAP,
ATTR_IGNORE,
} attr;
union {
@ -520,8 +521,9 @@ static int parse_attribute_crypto(struct sdp_attribute *output) {
return 0;
error:
ilog(LOG_ERROR, "Failed to parse a=crypto attribute: %s", err);
return -1;
ilog(LOG_ERROR, "Failed to parse a=crypto attribute, ignoring: %s", err);
output->attr = ATTR_IGNORE;
return 0;
}
static int parse_attribute_rtcp(struct sdp_attribute *output) {
@ -1533,6 +1535,7 @@ static int process_session_attributes(struct sdp_chopper *chop, struct sdp_attri
case ATTR_SENDRECV:
case ATTR_FINGERPRINT:
case ATTR_SETUP:
case ATTR_IGNORE:
goto strip;
case ATTR_GROUP:
@ -1596,10 +1599,12 @@ static int process_media_attributes(struct sdp_chopper *chop, struct sdp_media *
case ATTR_RTCP_MUX:
if (flags->ice_force_relay)
break;
// fall thru
case ATTR_INACTIVE:
case ATTR_SENDONLY:
case ATTR_RECVONLY:
case ATTR_SENDRECV:
case ATTR_IGNORE:
goto strip;
case ATTR_EXTMAP:


Loading…
Cancel
Save