Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Extensions/XEP-0065/TURNSocket.m
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ + (BOOL)isNewStartTURNRequest:(XMPPIQ *)iq

if (isTcpBytestreamQuery)
{
NSString *uuid = [iq elementID];
NSString *uuid = [[query attributeForName:@"sid"] stringValue];

@synchronized(existingTurnSockets)
{
Expand Down Expand Up @@ -270,16 +270,15 @@ - (id)initWithStream:(XMPPStream *)stream incomingTURNRequest:(XMPPIQ *)iq
xmppStream = stream;
jid = [iq from];

// Store a copy of the ID (which will be our uuid)
uuid = [[iq elementID] copy];

// Setup initial state for a server connection
state = STATE_INIT;
isClient = NO;

// Extract streamhost information from turn request
NSXMLElement *query = [iq elementForName:@"query" xmlns:@"http://jabber.org/protocol/bytestreams"];
streamhosts = [[query elementsForName:@"streamhost"] mutableCopy];
// Store a copy of the Session ID
uuid = [[[query attributeForName:@"sid"] stringValue] copy];

// Configure everything else
[self performPostInitSetup];
Expand Down