In Network Identity Manager, when locating the action object
corresponding to an action identifier using khui_find_action(), don't
search through the list of standard actions if we already know that
the object we are searching for is a custom action.
ticket: new
component: windows
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19984
dc483132-0cff-0310-8789-
dd5450dbe970
KHMEXP khui_action * KHMAPI
khui_find_action(khm_int32 id) {
- khui_action * act;
+ khui_action * act = NULL;
int i;
- act = khui_actions;
- for(i=0;i<khui_n_actions;i++) {
- if(act[i].cmd == id)
- return &act[i];
- }
+ if (id < KHUI_USERACTION_BASE) {
+ act = khui_actions;
+ for(i=0;i<khui_n_actions;i++) {
+ if(act[i].cmd == id)
+ return &act[i];
+ }
- act = NULL;
+ return NULL;
+ }
EnterCriticalSection(&cs_actions);
if (id >= KHUI_USERACTION_BASE &&