From 50cbe726dd000decb6fa2f972bf907c71a36e6fa Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Thu, 9 Aug 2007 22:10:43 +0000 Subject: [PATCH] pull up r19623 from trunk r19623@cathode-dark-space: jaltman | 2007-06-22 14:53:45 -0400 ticket: 5584 Add new notification flags KHERR_CTX_NEWCHILD, KHERR_CTX_FOLDCHILD, KHERR_CTX_PROGRESS for listeners of error context events to enable them to listen for child context events and progress updates. ticket: 5584 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19781 dc483132-0cff-0310-8789-dd5450dbe970 --- src/windows/identity/kherr/kherr.c | 8 +++++++- src/windows/identity/kherr/kherr.h | 17 ++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/windows/identity/kherr/kherr.c b/src/windows/identity/kherr/kherr.c index 3d0ea3fca..ec83f3895 100644 --- a/src/windows/identity/kherr/kherr.c +++ b/src/windows/identity/kherr/kherr.c @@ -86,7 +86,9 @@ KHMEXP void KHMAPI kherr_add_ctx_handler(kherr_ctx_handler h, filter = KHERR_CTX_BEGIN | KHERR_CTX_DESCRIBE | KHERR_CTX_END | - KHERR_CTX_ERROR; + KHERR_CTX_ERROR | + KHERR_CTX_NEWCHILD | + KHERR_CTX_FOLDCHILD; /* Since commit events are the most frequent, we put those handlers at the top of the list. When dispatching a commit @@ -1014,6 +1016,7 @@ KHMEXP void KHMAPI kherr_push_context(kherr_context * c) if (new_context && IS_KHERR_CTX(p)) { notify_ctx_event(KHERR_CTX_BEGIN, c); + notify_ctx_event(KHERR_CTX_NEWCHILD, p); } LeaveCriticalSection(&cs_error); @@ -1128,6 +1131,9 @@ KHMEXP void KHMAPI kherr_release_context(kherr_context * c) { add_event(p, e); TDELCHILD(p, c); + + notify_ctx_event(KHERR_CTX_FOLDCHILD, p); + kherr_release_context(p); } else { LDELETE(&ctx_root_list, c); diff --git a/src/windows/identity/kherr/kherr.h b/src/windows/identity/kherr/kherr.h index 50e876434..d792c6068 100644 --- a/src/windows/identity/kherr/kherr.h +++ b/src/windows/identity/kherr/kherr.h @@ -379,13 +379,16 @@ enum kherr_context_flags { \see kherr_add_ctx_handler() */ enum kherr_ctx_event { - KHERR_CTX_BEGIN = 0x0001, /*!< A new context was created */ - KHERR_CTX_DESCRIBE=0x0002, /*!< A context was described */ - KHERR_CTX_END = 0x0004, /*!< A context was closed */ - KHERR_CTX_ERROR = 0x0008, /*!< A context switched to an error - state */ - KHERR_CTX_EVTCOMMIT = 0x0010 /*!< A event was committed into the - context */ + KHERR_CTX_BEGIN = 0x00000001, /*!< A new context was created */ + KHERR_CTX_DESCRIBE = 0x00000002, /*!< A context was described */ + KHERR_CTX_END = 0x00000004, /*!< A context was closed */ + KHERR_CTX_ERROR = 0x00000008, /*!< A context switched to an + error state */ + KHERR_CTX_EVTCOMMIT = 0x00000010, /*!< A event was committed into + the context */ + KHERR_CTX_NEWCHILD = 0x00000020, /*!< A new child context was created */ + KHERR_CTX_FOLDCHILD = 0x00000040, /*!< A child context was folded */ + KHERR_CTX_PROGRESS = 0x00000080, /*!< Progress marker updated for context */ }; /*! \brief Context event handler -- 2.26.2