Skip to content

Commit

Permalink
Rename Jibri "error" status to "failed"
Browse files Browse the repository at this point in the history
  • Loading branch information
paweldomas committed May 19, 2016
1 parent 7589adb commit 49b9704
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jitsi-protocol-jabber</artifactId>
<version>2.9-20160513.193145-16</version>
<version>2.9-20160519.122058-17</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,15 +428,15 @@ private void processJibriIqFromJibri(JibriIq iq)
logger.info("Updating status from Jibri: " + iq.toXML()
+ " for " + roomName);

// We stop either on "off" or on "error"
// We stop either on "off" or on "failed"
if ((JibriIq.Status.OFF.equals(status) ||
JibriIq.Status.ERROR.equals(status))
JibriIq.Status.FAILED.equals(status))
&& recorderComponentJid != null/* This means we're recording */)
{
logger.info("Recording stopped for: " + roomName);
// Make sure that there is XMPPError for ERROR status
XMPPError error = iq.getError();
if (JibriIq.Status.ERROR.equals(status) && error == null)
if (JibriIq.Status.FAILED.equals(status) && error == null)
{
error = new XMPPError(
XMPPError.Condition.interna_server_error,
Expand Down Expand Up @@ -543,15 +543,15 @@ private XMPPError sendStopIQ()
*
* @param error if the recording stopped because of an error it should be
* passed as an argument here which will result in stopping with
* the {@link JibriIq.Status#ERROR} status passed to the application.
* the {@link JibriIq.Status#FAILED} status passed to the application.
*/
private void recordingStopped(XMPPError error)
{
recorderComponentJid = null;
// First we'll send an error and then follow with availability status
if (error != null)
{
setJibriStatus(JibriIq.Status.ERROR, error);
setJibriStatus(JibriIq.Status.FAILED, error);
}
// Update based on availability
updateJibriAvailability();
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/jitsi/jicofo/xmpp/JibriIqProviderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void testParseError()
String iqXml =
"<iq to='t' from='f'>" +
"<jibri xmlns='http://jitsi.org/protocol/jibri'" +
" status='error'>" +
" status='failed'>" +
"<error xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' " +
" type='wait' code='504'>" +
"<remote-server-timeout" +
Expand All @@ -86,7 +86,7 @@ public void testParseError()

assertNotNull(jibriIq);

assertEquals(JibriIq.Status.ERROR, jibriIq.getStatus());
assertEquals(JibriIq.Status.FAILED, jibriIq.getStatus());

XMPPError error = jibriIq.getError();
assertNotNull(error);
Expand Down

0 comments on commit 49b9704

Please sign in to comment.