no need to be careful about Int parsing in session description; just fail
This commit is contained in:
parent
6884e427ef
commit
2ba84bd32e
|
@ -249,7 +249,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
|||
final SessionDescription sessionDescription;
|
||||
try {
|
||||
sessionDescription = SessionDescription.of(contentMap);
|
||||
} catch (final IllegalArgumentException e) {
|
||||
} catch (final IllegalArgumentException | NullPointerException e) {
|
||||
Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": unable convert offer from session-accept to SDP", e);
|
||||
webRTCWrapper.close();
|
||||
sendSessionTerminate(Reason.FAILED_APPLICATION, e.getMessage());
|
||||
|
@ -276,7 +276,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
|||
final SessionDescription offer;
|
||||
try {
|
||||
offer = SessionDescription.of(rtpContentMap);
|
||||
} catch (final IllegalArgumentException e) {
|
||||
} catch (final IllegalArgumentException | NullPointerException e) {
|
||||
Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": unable convert offer from session-initiate to SDP", e);
|
||||
webRTCWrapper.close();
|
||||
sendSessionTerminate(Reason.FAILED_APPLICATION, e.getMessage());
|
||||
|
|
|
@ -137,6 +137,9 @@ public class SessionDescription {
|
|||
attributeMap.put("msid-semantic", " WMS my-media-stream");
|
||||
|
||||
for (Map.Entry<String, RtpContentMap.DescriptionTransport> entry : contentMap.contents.entrySet()) {
|
||||
|
||||
//TODO sprinkle in a few noWhiteSpaces checks into various parameters and types
|
||||
|
||||
final String name = entry.getKey();
|
||||
RtpContentMap.DescriptionTransport descriptionTransport = entry.getValue();
|
||||
RtpDescription description = descriptionTransport.description;
|
||||
|
|
|
@ -145,10 +145,7 @@ public class RtpDescription extends GenericDescription {
|
|||
|
||||
public int getValue() {
|
||||
final String value = getAttribute("value");
|
||||
if (value == null) {
|
||||
return 0;
|
||||
}
|
||||
return SessionDescription.ignorantIntParser(value);
|
||||
return Integer.parseInt(value);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue