From: Tom Yu Date: Wed, 14 Dec 2005 21:10:44 +0000 (+0000) Subject: Pull up r17555 from trunk X-Git-Tag: kfw-3.0.1-final~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f7d1e5450c7bdc5d81e4a757fe250c4cefa9c3f7;p=krb5.git Pull up r17555 from trunk ticket: 3286 version_fixed: 1.4.4 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-4@17560 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/windows/identity/kmm/kmm_module.c b/src/windows/identity/kmm/kmm_module.c index 25da22345..d5a61c740 100644 --- a/src/windows/identity/kmm/kmm_module.c +++ b/src/windows/identity/kmm/kmm_module.c @@ -208,12 +208,15 @@ kmmint_read_module_info(kmm_module_i * m) { } n_languages = (int) (cb / sizeof(*languages)); + + /* Try searching for the user's default language first */ lang = GetUserDefaultLangID(); for (i = 0; i < n_languages; i++) { if(languages[i].language == lang) break; } + /* If not, try the system default */ if (i >= n_languages) { lang = GetSystemDefaultLangID(); for (i=0; i= n_languages) { + lang = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US); + for (i=0; i= n_languages) { + lang = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL); + for (i=0; i= n_languages) { + i = 0; + } + if (i >= n_languages) { rv = KHM_ERROR_INVALID_PARAM; _report_mr0(KHERR_WARNING, MSG_RMI_NO_LOCAL); @@ -247,7 +271,6 @@ kmmint_read_module_info(kmm_module_i * m) { _report_mr1(KHERR_WARNING, MSG_RMI_RES_TOO_LONG, _cstr(TEXT(NIMV_MODULE))); goto _cleanup; - } if (wcscmp(r, m->name)) { @@ -580,8 +603,8 @@ kmm_release_module_info_i(kmm_module_info * info) { KHMEXP khm_int32 KHMAPI -kmm_unload_module(kmm_module module) -{ +kmm_unload_module(kmm_module module) { + if(!kmm_is_module(module)) return KHM_ERROR_INVALID_PARAM;