From: Kevin Wasserman Date: Mon, 16 Jul 2012 18:22:23 +0000 (-0400) Subject: 'Destroy tickets on exit' destroys all tickets X-Git-Tag: kfw-4.0-final~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da9f8bbcc441c97c0415fb4581403b6b37411df3;p=thirdparty%2Fkrb5.git 'Destroy tickets on exit' destroys all tickets Previously destroyed only default ccache and used obsolete functions. Signed-off-by: Kevin Wasserman (cherry picked from commit cc96011e055131c81f224e126260f25c5318d97b) ticket: 7304 status: resolved --- 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)