Author: berndf
Date: Fri May 25 13:02:50 2012
New Revision: 1342607

URL: http://svn.apache.org/viewvc?rev=1342607&view=rev
Log:
do return presence error stanzas to the client

Modified:
    
mina/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/core/im/handler/PresenceAvailabilityHandler.java

Modified: 
mina/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/core/im/handler/PresenceAvailabilityHandler.java
URL: 
http://svn.apache.org/viewvc/mina/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/core/im/handler/PresenceAvailabilityHandler.java?rev=1342607&r1=1342606&r2=1342607&view=diff
==============================================================================
--- 
mina/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/core/im/handler/PresenceAvailabilityHandler.java
 (original)
+++ 
mina/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/core/im/handler/PresenceAvailabilityHandler.java
 Fri May 25 13:02:50 2012
@@ -136,13 +136,18 @@ public class PresenceAvailabilityHandler
                 return handleInboundPresenceProbe(presenceStanza, 
serverRuntimeContext, sessionContext, registry,
                         rosterManager);
             } else if (type == ERROR) {
-                throw new RuntimeException("not implemented yet");
+                return handleInboundPresenceError(presenceStanza, 
serverRuntimeContext, sessionContext, registry);
             } else {
                 throw new RuntimeException("unhandled inbound presence case " 
+ type.value());
             }
         }
     }
 
+    protected Stanza handleInboundPresenceError(PresenceStanza stanza, 
ServerRuntimeContext serverRuntimeContext, 
+                                              SessionContext sessionContext, 
ResourceRegistry registry) {
+        return stanza; // send to client
+    }
+
     @SpecCompliance(compliant = { @SpecCompliant(spec = "RFC3921bis-08", 
section = "4.5.2", status = IN_PROGRESS) })
     private Stanza handleOutboundUnavailable(PresenceStanza presenceStanza, 
ServerRuntimeContext serverRuntimeContext,
             SessionContext sessionContext, RosterManager rosterManager, Entity 
user, ResourceRegistry registry) {


Reply via email to