@@ -239,20 +239,7 @@ public class JingleRtpConnection extends AbstractJingleConnection
}
receiveTransportInfo(jinglePacket, contentMap);
} else {
- if (isTerminated()) {
- respondOk(jinglePacket);
- Log.d(
- Config.LOGTAG,
- id.account.getJid().asBareJid()
- + ": ignoring out-of-order transport info; we where already terminated");
- } else {
- Log.d(
- Config.LOGTAG,
- id.account.getJid().asBareJid()
- + ": received transport info while in state="
- + this.state);
- terminateWithOutOfOrder(jinglePacket);
- }
+ receiveOutOfOrderAction(jinglePacket, Jingle.Action.TRANSPORT_INFO);
}
}
@@ -340,7 +327,7 @@ public class JingleRtpConnection extends AbstractJingleConnection
},
MoreExecutors.directExecutor());
} else {
- terminateWithOutOfOrder(iq);
+ receiveOutOfOrderAction(iq, Jingle.Action.CONTENT_ADD);
}
}
@@ -416,7 +403,7 @@ public class JingleRtpConnection extends AbstractJingleConnection
final RtpContentMap outgoingContentAdd = this.outgoingContentAdd;
if (outgoingContentAdd == null) {
Log.d(Config.LOGTAG, "received content-accept when we had no outgoing content add");
- terminateWithOutOfOrder(jinglePacket);
+ receiveOutOfOrderAction(jinglePacket, Jingle.Action.CONTENT_ACCEPT);
return;
}
final Set<ContentAddition.Summary> ourSummary = ContentAddition.summary(outgoingContentAdd);
@@ -446,7 +433,7 @@ public class JingleRtpConnection extends AbstractJingleConnection
MoreExecutors.directExecutor());
} else {
Log.d(Config.LOGTAG, "received content-accept did not match our outgoing content-add");
- terminateWithOutOfOrder(jinglePacket);
+ receiveOutOfOrderAction(jinglePacket, Jingle.Action.CONTENT_ACCEPT);
}
}
@@ -487,7 +474,7 @@ public class JingleRtpConnection extends AbstractJingleConnection
private void receiveContentModify(final Iq jinglePacket, final Jingle jingle) {
if (this.state != State.SESSION_ACCEPTED) {
- terminateWithOutOfOrder(jinglePacket);
+ receiveOutOfOrderAction(jinglePacket, Jingle.Action.CONTENT_MODIFY);
return;
}
final Map<String, Content.Senders> modification =
@@ -613,7 +600,7 @@ public class JingleRtpConnection extends AbstractJingleConnection
final RtpContentMap outgoingContentAdd = this.outgoingContentAdd;
if (outgoingContentAdd == null) {
Log.d(Config.LOGTAG, "received content-reject when we had no outgoing content add");
- terminateWithOutOfOrder(jinglePacket);
+ receiveOutOfOrderAction(jinglePacket, Jingle.Action.CONTENT_REJECT);
return;
}
final Set<ContentAddition.Summary> ourSummary = ContentAddition.summary(outgoingContentAdd);
@@ -624,7 +611,7 @@ public class JingleRtpConnection extends AbstractJingleConnection
receiveContentReject(ourSummary);
} else {
Log.d(Config.LOGTAG, "received content-reject did not match our outgoing content-add");
- terminateWithOutOfOrder(jinglePacket);
+ receiveOutOfOrderAction(jinglePacket, Jingle.Action.CONTENT_REJECT);
}
}