aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/service/protocol/media
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2010-11-16 16:03:42 +0000
committerDamian Minkov <damencho@jitsi.org>2010-11-16 16:03:42 +0000
commit9112b121b66969d6e9414f4c854486c471074e80 (patch)
tree1dce9fdc664284677ae337b66cb92a23f2b401c9 /src/net/java/sip/communicator/service/protocol/media
parenta35b4685f447bbd98883ab5d8539b6fdf8c1aab1 (diff)
downloadjitsi-9112b121b66969d6e9414f4c854486c471074e80.zip
jitsi-9112b121b66969d6e9414f4c854486c471074e80.tar.gz
jitsi-9112b121b66969d6e9414f4c854486c471074e80.tar.bz2
Fix closing media when Bye has a reason string, fix missed and not overriden method.
Diffstat (limited to 'src/net/java/sip/communicator/service/protocol/media')
-rw-r--r--src/net/java/sip/communicator/service/protocol/media/MediaAwareCallPeer.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallPeer.java b/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallPeer.java
index f98e061..5035248 100644
--- a/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallPeer.java
+++ b/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallPeer.java
@@ -492,6 +492,22 @@ public abstract class MediaAwareCallPeer
@Override
public void setState(CallPeerState newState, String reason)
{
+ this.setState(newState, reason, -1);
+ }
+
+ /**
+ * Overrides the parent set state method in order to make sure that we
+ * close our media handler whenever we enter a disconnected state.
+ *
+ * @param newState the <tt>CallPeerState</tt> that we are about to enter and
+ * that we pass to our predecessor.
+ * @param reason a reason phrase explaining the state (e.g. if newState
+ * indicates a failure) and that we pass to our predecessor.
+ * @param reasonCode the code for the reason of the state change.
+ */
+ @Override
+ public void setState(CallPeerState newState, String reason, int reasonCode)
+ {
// synchronized to mediaHandler if there are currently jobs of
// initializing, configuring and starting streams (method processAnswer
// of CallPeerMediaHandler) we won't set and fire the current state
@@ -499,7 +515,7 @@ public abstract class MediaAwareCallPeer
// in order to deliver states as quick as possible.
synchronized(getMediaHandler())
{
- super.setState(newState, reason);
+ super.setState(newState, reason, reasonCode);
if (CallPeerState.DISCONNECTED.equals(newState)
|| CallPeerState.FAILED.equals(newState))