Commit ef5c9999 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed error when audited packet is not related to a session (e.g. legacy network user). JM-979

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@7133 b35dd754-fafc-0310-a699-88a17e54d16e
parent b7e5e637
...@@ -381,10 +381,10 @@ public class AuditorImpl implements Auditor { ...@@ -381,10 +381,10 @@ public class AuditorImpl implements Auditor {
public AuditPacket(Packet packet, Session session) { public AuditPacket(Packet packet, Session session) {
element = docFactory.createElement("packet", "http://www.jivesoftware.org"); element = docFactory.createElement("packet", "http://www.jivesoftware.org");
creationDate = new Date(); creationDate = new Date();
if (session.getStreamID() != null) { if (session != null && session.getStreamID() != null) {
element.addAttribute("streamID", session.getStreamID().toString()); element.addAttribute("streamID", session.getStreamID().toString());
} }
switch (session.getStatus()) { switch (session == null ? 0 : session.getStatus()) {
case Session.STATUS_AUTHENTICATED: case Session.STATUS_AUTHENTICATED:
element.addAttribute("status", "auth"); element.addAttribute("status", "auth");
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment