Create security off event object in security control event handler

cusax-fix
Ingo Bauersachs 14 years ago
parent ca2dd7b26f
commit 5f3e5311fb

@ -280,8 +280,6 @@ protected void fireCallPeerChangeEvent(String eventType,
* source, setting it to be of type <tt>eventType</tt> and the corresponding
* <tt>oldValue</tt> and <tt>newValue</tt>.
*
* @param sessionType the type of the session - audio or video
* @param cipher the cipher associated with the event.
* @param evt the event object with details to pass on to the consumers
*/
protected void fireCallPeerSecurityOnEvent(CallPeerSecurityOnEvent evt)
@ -311,33 +309,28 @@ protected void fireCallPeerSecurityOnEvent(CallPeerSecurityOnEvent evt)
* source, setting it to be of type <tt>eventType</tt> and the corresponding
* <tt>oldValue</tt> and <tt>newValue</tt>.
*
* @param sessionType the type of the session - audio or video
* @param evt the event object with details to pass on to the consumers
*/
protected void fireCallPeerSecurityOffEvent(int sessionType)
protected void fireCallPeerSecurityOffEvent(CallPeerSecurityOffEvent evt)
{
CallPeerSecurityOffEvent event
= new CallPeerSecurityOffEvent( this, sessionType);
lastSecurityEvent = event;
lastSecurityEvent = evt;
if (logger.isDebugEnabled())
logger.debug(
"Dispatching a CallPeerSecurityAuthenticationEvent event to "
+ callPeerSecurityListeners.size()
+" listeners. event is: " + event.toString());
+" listeners. event is: " + evt.toString());
Iterator<CallPeerSecurityListener> listeners = null;
List<CallPeerSecurityListener> listeners = null;
synchronized (callPeerSecurityListeners)
{
listeners = new ArrayList<CallPeerSecurityListener>(
callPeerSecurityListeners).iterator();
callPeerSecurityListeners);
}
while (listeners.hasNext())
for(CallPeerSecurityListener listener : listeners)
{
CallPeerSecurityListener listener = listeners.next();
listener.securityOff(event);
listener.securityOff(evt);
}
}

@ -696,10 +696,12 @@ public void securityTurnedOff(int sessionType)
// If this event has been triggered because of a call end event and the
// call is already ended we don't need to alert the user for
// security off.
Call call = getCall();
if((call != null) && !call.getCallState().equals(CallState.CALL_ENDED))
fireCallPeerSecurityOffEvent(sessionType);
{
CallPeerSecurityOffEvent event
= new CallPeerSecurityOffEvent( this, sessionType);
fireCallPeerSecurityOffEvent(event);
}
}
/**

Loading…
Cancel
Save