Skip to content

Commit

Permalink
fix(FocusComponent): process XMPP packets in order
Browse files Browse the repository at this point in the history
Updates Jicoco in order to use the single thread packet processor.
  • Loading branch information
paweldomas committed Nov 1, 2016
1 parent a82538b commit 0cdd424
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jicoco</artifactId>
<version>1.0-20160420.185019-32</version>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/org/jitsi/jicofo/xmpp/FocusComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ protected String[] discoInfoFeatureNamespaces()
}

@Override
protected IQ handleIQGet(IQ iq)
protected IQ handleIQGetImpl(IQ iq)
throws Exception
{
try
Expand Down Expand Up @@ -237,7 +237,7 @@ else if (smackIq instanceof LoginUrlIQ)
}
else
{
return super.handleIQGet(iq);
return super.handleIQGetImpl(iq);
}
}
catch (Exception e)
Expand All @@ -258,10 +258,9 @@ else if (smackIq instanceof LoginUrlIQ)
* <tt>feature-not-implemented</tt>
* @throws Exception to reply with <tt>internal-server-error</tt> to the
* specified request
* @see AbstractComponent#handleIQSet(IQ)
*/
@Override
public IQ handleIQSet(IQ iq)
public IQ handleIQSetImpl(IQ iq)
throws Exception
{
try
Expand Down Expand Up @@ -332,7 +331,7 @@ else if (smackIq instanceof LogoutIq)
}
else
{
return super.handleIQSet(iq);
return super.handleIQSetImpl(iq);
}
}
catch (Exception e)
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/org/jitsi/jicofo/ShutdownTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void testShutdown()

gracefulShutdownIQ.setFrom("randomJid1234");

IQ result = focusComponent.handleIQSet(
IQ result = focusComponent.handleIQSetImpl(
IQUtils.convert(gracefulShutdownIQ));

assertEquals(IQ.Type.error, result.getType());
Expand All @@ -109,7 +109,7 @@ public void testShutdown()
// Now use authorized JID
gracefulShutdownIQ.setFrom(shutdownJid);

result = focusComponent.handleIQSet(
result = focusComponent.handleIQSetImpl(
IQUtils.convert(gracefulShutdownIQ));

assertEquals(IQ.Type.result, result.getType());
Expand All @@ -118,7 +118,7 @@ public void testShutdown()
ConferenceIq newConferenceIQ = new ConferenceIq();
newConferenceIQ.setRoom("newRoom1");

result = focusComponent.handleIQSet(
result = focusComponent.handleIQSetImpl(
IQUtils.convert(newConferenceIQ));

assertEquals(IQ.Type.error, result.getType());
Expand All @@ -133,7 +133,7 @@ public void testShutdown()
ConferenceIq activeConfRequest = new ConferenceIq();
activeConfRequest.setRoom(roomName);

result = focusComponent.handleIQSet(
result = focusComponent.handleIQSetImpl(
IQUtils.convert(activeConfRequest));

assertEquals(IQ.Type.result, result.getType());
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/jitsi/jicofo/XmppTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void testAllocateConference()
conferenceIq.setRoom(roomName);

IQ result
= focusComponent.handleIQSet(
= focusComponent.handleIQSetImpl(
IQUtils.convert(conferenceIq));

assertNotNull(result);
Expand Down

0 comments on commit 0cdd424

Please sign in to comment.