diff options
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol')
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/jabber/CallPeerJabberImpl.java | 23 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTelephonyConferencingJabberImpl.java | 30 |
2 files changed, 21 insertions, 32 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/CallPeerJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/CallPeerJabberImpl.java index 9ae9a2f..9e5ee8e 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/CallPeerJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/CallPeerJabberImpl.java @@ -311,9 +311,7 @@ public class CallPeerJabberImpl } /** - * Processes the session initiation {@link JingleIQ} that we were created - * with, passing its content to the media handler and then sends either a - * "session-info/ringing" or a "session-terminate" response. + * Creates and sends a session-initiate {@link JingleIQ}. * * @param sessionInitiateExtensions a collection of additional and optional * <tt>PacketExtension</tt>s to be added to the <tt>session-initiate</tt> @@ -331,10 +329,6 @@ public class CallPeerJabberImpl List<ContentPacketExtension> offer = getMediaHandler().createContentList(); - //send a ringing response - if (logger.isTraceEnabled()) - logger.trace("will send ringing response: "); - ProtocolProviderServiceJabberImpl protocolProvider = getProtocolProvider(); @@ -656,12 +650,9 @@ public class CallPeerJabberImpl } /** - * Processes the session initiation {@link JingleIQ} that we were created - * with, passing its content to the media handler and then sends either a - * "session-info/ringing" or a "session-terminate" response. + * Processes a session-accept {@link JingleIQ}. * - * @param sessionInitIQ The {@link JingleIQ} that created the session that - * we are handling here. + * @param sessionInitIQ The session-accept {@link JingleIQ} to process. */ public void processSessionAccept(JingleIQ sessionInitIQ) { @@ -692,7 +683,7 @@ public class CallPeerJabberImpl return; } - //tell everyone we are connecting so that the audio notifications would + //tell everyone we are connected so that the audio notifications would //stop setState(CallPeerState.CONNECTED); @@ -1100,9 +1091,9 @@ public class CallPeerJabberImpl (!isInitiator() && senders == SendersEnum.responder)) direction = direction.or(MediaDirection.RECVONLY); - // If RTP translation is enabled and we are receiving media from another - // CallPeer in the same Call, the direction should allow sending - if (mediaHandler.isRTPTranslationEnabled(mediaType)) + // If we are the focus of a conference and we are receiving media from + // another CallPeer in the same Call, the direction should allow sending + if (getCall().isConferenceFocus()) { for (CallPeerJabberImpl peer : getCall().getCallPeerList()) { diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTelephonyConferencingJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTelephonyConferencingJabberImpl.java index ebf6282..663de4b 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTelephonyConferencingJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTelephonyConferencingJabberImpl.java @@ -382,28 +382,26 @@ public class OperationSetTelephonyConferencingJabberImpl String errorMessage = null; //first ack all "set" requests. - if (coinIQ.getType() == IQ.Type.SET) + IQ.Type type = coinIQ.getType(); + if (type == IQ.Type.SET) { IQ ack = IQ.createResultIQ(coinIQ); parentProvider.getConnection().sendPacket(ack); } - - if(coinIQ.getType() == IQ.Type.ERROR) + else if(type == IQ.Type.ERROR) { - logger.error("Received error in COIN packet."); - XMPPError error = coinIQ.getError(); if(error != null) { String msg = error.getMessage(); errorMessage = ((msg != null)? (msg + " ") : "") + "Error code: " + error.getCode(); - - logger.error(errorMessage); } + + logger.error("Received error in COIN packet. "+errorMessage); } - + String sid = coinIQ.getSID(); if (sid != null) @@ -411,20 +409,20 @@ public class OperationSetTelephonyConferencingJabberImpl CallPeerJabberImpl callPeer = getBasicTelephony().getActiveCallsRepository().findCallPeer( sid); - - + + if (callPeer != null) { - if (logger.isDebugEnabled()) - logger.debug("Processing COIN from " + coinIQ.getFrom() - + " (version=" + coinIQ.getVersion() + ")"); - - if(coinIQ.getType() == IQ.Type.ERROR) + if(type == IQ.Type.ERROR) { callPeer.fireConferenceMemberErrorEvent(errorMessage); return; } - + + if (logger.isDebugEnabled()) + logger.debug("Processing COIN from " + coinIQ.getFrom() + + " (version=" + coinIQ.getVersion() + ")"); + handleCoin(callPeer, coinIQ); } } |