synchronized (dialogTable) { Iterator it = this.dialogTable.values().iterator(); while (it.hasNext()) { SIPDialog d = (SIPDialog) it.next(); if (d == dialog) { if (LogWriter.needsLogging) { String dialogId = dialog.getDialogId(); logWriter.logMessage("Removing Dialog " + dialogId); } it.remove(); }
String id = dialog.getDialogId(); if (id != null) { Object old = this.dialogTable.remove(id);  if (old != null && !dialog.testAndSetIsDialogTerminatedEventDelivered()) { DialogTerminatedEvent event = new DialogTerminatedEvent(dialog .getSipProvider(), dialog);    dialog.getSipProvider().handleEvent(event, null);
	public void removeDialog(SIPDialog dialog) {		synchronized (dialogTable) {			Iterator it = this.dialogTable.values().iterator();			while (it.hasNext()) {				SIPDialog d = (SIPDialog) it.next();				if (d == dialog) {					if (LogWriter.needsLogging) {						String dialogId = dialog.getDialogId();						logWriter.logMessage("Removing Dialog " + dialogId);					}					it.remove();				}			}		}	}