From cc96011e055131c81f224e126260f25c5318d97b Mon Sep 17 00:00:00 2001 From: Kevin Wasserman Date: Mon, 16 Jul 2012 14:22:23 -0400 Subject: 'Destroy tickets on exit' destroys all tickets Previously destroyed only default ccache and used obsolete functions. Signed-off-by: Kevin Wasserman ticket: 7304 (new) queue: kfw target_version: 1.10.4 tags: pullup --- src/windows/leash/LeashView.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'src/windows/leash') diff --git a/src/windows/leash/LeashView.cpp b/src/windows/leash/LeashView.cpp index 881d5c16fa..83134e4886 100644 --- a/src/windows/leash/LeashView.cpp +++ b/src/windows/leash/LeashView.cpp @@ -1947,22 +1947,17 @@ VOID CLeashView::ResetTreeNodes() VOID CLeashView::OnDestroy() { + CCacheDisplayData *elem; SetTrayIcon(NIM_DELETE); - CListView::OnDestroy(); - if (WaitForSingleObject( ticketinfo.lockObj, INFINITE ) != WAIT_OBJECT_0) - throw("Unable to lock ticketinfo"); - BOOL b_destroy = m_destroyTicketsOnExit && ticketinfo.Krb5.btickets; - ReleaseMutex(ticketinfo.lockObj); - - if (b_destroy) - { - if (pLeash_kdestroy()) - { - AfxMessageBox("There is a problem destroying tickets!", - MB_OK|MB_ICONSTOP); + if (m_destroyTicketsOnExit) { + elem = m_ccacheDisplay; + while (elem != NULL) { + kdestroy(elem->m_ccacheName); + elem = elem->m_next; } } + CListView::OnDestroy(); } VOID CLeashView::OnUpdateDestroyTicket(CCmdUI* pCmdUI) -- cgit