Fixes a race condition in Jingle with Google P2P transport where we can receive a candidate and our stream is not yet created. Also updates the ALLOW_NON_SECURE resource string.

cusax-fix
Sebastien Vincent 14 years ago
parent 38c7572c9f
commit 84222a1e6a

@ -492,7 +492,7 @@ service.gui.SECURITY_WARNING=Security warning
service.gui.SECURITY_ERROR=Security error
service.gui.SPEED=Speed:
service.gui.SILENT_MEMBER=silent member
service.gui.NON_SECURE_CONNECTION=No secure connection can be made for account {0}. If you want to connect to non-secure server, please check \"Allow non-secure connection\" in your account configuration
service.gui.NON_SECURE_CONNECTION=No secure connection can be made for account {0}. If you want to connect to non-secure server, please check \"Allow non-secure connections\" in your account configuration
service.gui.UPDATE=Update
service.gui.JANUARY=Jan
@ -841,7 +841,7 @@ plugin.jabberaccregwizz.USE_UPNP=Use UPnP
plugin.jabberaccregwizz.EXISTING_ACCOUNT=Existing Jabber account
plugin.jabberaccregwizz.DOMAIN_BYPASS_CAPS=Domain that will use GTalk call
plugin.jabberaccregwizz.TELEPHONY_DOMAIN=Telephony domain
plugin.jabberaccregwizz.ALLOW_NON_SECURE=Allow non-secure connection
plugin.jabberaccregwizz.ALLOW_NON_SECURE=Allow non-secure connections
# mailbox
plugin.mailbox.OUTGOING=Outgoing Message:

@ -32,6 +32,11 @@ public class P2PTransportManager
private static final Logger logger
= Logger.getLogger(P2PTransportManager.class);
/**
* Synchronization object.
*/
private final Object wrapupSyncRoot = new Object();
/**
* Creates a new instance of this transport manager, binding it to the
* specified peer.
@ -200,7 +205,12 @@ public void startCandidateHarvest(
= ourContent.getFirstChildOfType(
RtpDescriptionPacketExtension.class);
IceMediaStream stream = createIceStream(rtpDesc.getMedia());
IceMediaStream stream = null;
synchronized(wrapupSyncRoot)
{
stream = createIceStream(rtpDesc.getMedia());
}
//we now generate the XMPP code containing the candidates.
ourContent.addChildExtension(createTransport(stream));
@ -235,7 +245,10 @@ public void run()
IceMediaStream stream = null;
try
{
stream = createIceStream(rtpDesc.getMedia());
synchronized(wrapupSyncRoot)
{
stream = createIceStream(rtpDesc.getMedia());
}
}
catch (OperationFailedException e)
{
@ -428,8 +441,12 @@ public synchronized boolean startConnectivityEstablishment(
if(candidate.getProtocol().equalsIgnoreCase("ssltcp"))
continue;
Component component
= stream.getComponent(candidate.getComponent());
Component component = null;
synchronized(wrapupSyncRoot)
{
component = stream.getComponent(candidate.getComponent());
}
RemoteCandidate remoteCandidate = new RemoteCandidate(
new TransportAddress(

Loading…
Cancel
Save