X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=mech_eap%2Futil_attr.cpp;fp=mech_eap%2Futil_attr.cpp;h=76468f9ba64f05e4adb4f2c897a9eaf6e625e987;hb=f03c7a933c07683a4bdb8e767380a0805d3df96e;hp=10f1ad4beb7a8be521c21f34f9a655d65d36d878;hpb=f108553f3d55586df7837c116d910575a5c17d59;p=moonshot.git diff --git a/mech_eap/util_attr.cpp b/mech_eap/util_attr.cpp index 10f1ad4..76468f9 100644 --- a/mech_eap/util_attr.cpp +++ b/mech_eap/util_attr.cpp @@ -331,19 +331,24 @@ gss_eap_attr_ctx::initFromBuffer(const gss_buffer_t buffer) didInit[type] = true; } - for (size_t i = ATTR_TYPE_MIN; i <= ATTR_TYPE_MAX; i++) { + /* + * The call the initFromGssContext methods for attribute + * providers that can initialize themselves from other + * providers. + */ + for (size_t type = ATTR_TYPE_MIN; type <= ATTR_TYPE_MAX; type++) { gss_eap_attr_provider *provider; - if (didInit[i]) + if (didInit[type]) continue; - provider = m_providers[i]; + provider = m_providers[type]; ret = provider->initFromGssContext(this, GSS_C_NO_CREDENTIAL, GSS_C_NO_CONTEXT); if (ret == false) { - releaseProvider(i); + releaseProvider(type); break; } }