Using Connection: Manager: Invalid presence type should be warning

Hi!

If you pass an invalid presence type using Connection Managers instead of connecting directly to the server, the server raises an Exception and it disconnects the user.

It looks that this was fixed long time ago in http://www.igniterealtime.org/issues/browse/JM-340 when you don’'t use a Connection Manager (dicussion here http://www.igniterealtime.org/forum/thread.jspa?messageID=101564#101564).

To be able to use a Connection Manager, you should make a fix something like this.

I hope this helps.

— src/java/org/jivesoftware/wildfire/PresenceRouter.java.orig 2007-01-04 17:45:50.000000000 +0100

+++ src/java/org/jivesoftware/wildfire/PresenceRouter.java 2007-01-04 17:04:20.000000000 +0100

@@ -81,7 +81,19 @@

}

}

try {

  •        Presence.Type type = packet.getType();
    
  •        // Check that the presence type is valid. If not then assume available type
    
  •     Presence.Type type  = null;
    
  •     try {
    
  •       type = packet.getType();
    
  •     }
    
  •     catch (IllegalArgumentException e) {
    
  •       Log.warn("Invalid presence type", e);
    
  •       // The presence packet contains an invalid presence type so replace it with
    
  •       // an available presence type
    
  •       packet.setType(null);
    
  •     }
    

// Presence updates (null is ‘‘available’’)

if (type == null || Presence.Type.unavailable == type) {

// check for local server target