projects
/
moonshot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More careful matching of alloc/free functions
[moonshot.git]
/
moonshot
/
mech_eap
/
util_attr.cpp
diff --git
a/moonshot/mech_eap/util_attr.cpp
b/moonshot/mech_eap/util_attr.cpp
index
d24615d
..
3bfe785
100644
(file)
--- a/
moonshot/mech_eap/util_attr.cpp
+++ b/
moonshot/mech_eap/util_attr.cpp
@@
-50,7
+50,9
@@
GSSEAP_ONCE_CALLBACK(gssEapAttrProvidersInitInternal)
{
OM_uint32 major, minor;
{
OM_uint32 major, minor;
- assert(gssEapAttrProvidersInitStatus == GSS_S_UNAVAILABLE);
+ GSSEAP_ASSERT(gssEapAttrProvidersInitStatus == GSS_S_UNAVAILABLE);
+
+ json_set_alloc_funcs(GSSEAP_MALLOC, GSSEAP_FREE);
major = gssEapRadiusAttrProviderInit(&minor);
if (GSS_ERROR(major))
major = gssEapRadiusAttrProviderInit(&minor);
if (GSS_ERROR(major))
@@
-69,7
+71,7
@@
GSSEAP_ONCE_CALLBACK(gssEapAttrProvidersInitInternal)
cleanup:
#ifdef GSSEAP_DEBUG
cleanup:
#ifdef GSSEAP_DEBUG
-
assert
(major == GSS_S_COMPLETE);
+
GSSEAP_ASSERT
(major == GSS_S_COMPLETE);
#endif
gssEapAttrProvidersInitStatus = major;
#endif
gssEapAttrProvidersInitStatus = major;
@@
-115,9
+117,9
@@
void
gss_eap_attr_ctx::registerProvider(unsigned int type,
gss_eap_attr_create_provider factory)
{
gss_eap_attr_ctx::registerProvider(unsigned int type,
gss_eap_attr_create_provider factory)
{
-
assert
(type <= ATTR_TYPE_MAX);
+
GSSEAP_ASSERT
(type <= ATTR_TYPE_MAX);
-
assert
(gssEapAttrFactories[type] == NULL);
+
GSSEAP_ASSERT
(gssEapAttrFactories[type] == NULL);
gssEapAttrFactories[type] = factory;
}
gssEapAttrFactories[type] = factory;
}
@@
-128,7
+130,7
@@
gss_eap_attr_ctx::registerProvider(unsigned int type,
void
gss_eap_attr_ctx::unregisterProvider(unsigned int type)
{
void
gss_eap_attr_ctx::unregisterProvider(unsigned int type)
{
-
assert
(type <= ATTR_TYPE_MAX);
+
GSSEAP_ASSERT
(type <= ATTR_TYPE_MAX);
gssEapAttrFactories[type] = NULL;
}
gssEapAttrFactories[type] = NULL;
}
@@
-416,7
+418,7
@@
gss_eap_attr_ctx::~gss_eap_attr_ctx(void)
gss_eap_attr_provider *
gss_eap_attr_ctx::getProvider(unsigned int type) const
{
gss_eap_attr_provider *
gss_eap_attr_ctx::getProvider(unsigned int type) const
{
-
assert
(type >= ATTR_TYPE_MIN && type <= ATTR_TYPE_MAX);
+
GSSEAP_ASSERT
(type >= ATTR_TYPE_MIN && type <= ATTR_TYPE_MAX);
return m_providers[type];
}
return m_providers[type];
}
@@
-714,7
+716,7
@@
gss_eap_attr_ctx::mapException(OM_uint32 *minor, std::exception &e) const
}
cleanup:
}
cleanup:
-
assert
(GSS_ERROR(major));
+
GSSEAP_ASSERT
(GSS_ERROR(major));
return major;
}
return major;
}
@@
-1008,7
+1010,7
@@
gssEapImportAttrContext(OM_uint32 *minor,
gss_eap_attr_ctx *ctx = NULL;
OM_uint32 major = GSS_S_FAILURE;
gss_eap_attr_ctx *ctx = NULL;
OM_uint32 major = GSS_S_FAILURE;
-
assert
(name->attrCtx == NULL);
+
GSSEAP_ASSERT
(name->attrCtx == NULL);
if (GSS_ERROR(gssEapAttrProvidersInit(minor)))
return GSS_S_UNAVAILABLE;
if (GSS_ERROR(gssEapAttrProvidersInit(minor)))
return GSS_S_UNAVAILABLE;
@@
-1032,7
+1034,7
@@
gssEapImportAttrContext(OM_uint32 *minor,
major = ctx->mapException(minor, e);
}
major = ctx->mapException(minor, e);
}
-
assert
(major == GSS_S_COMPLETE || name->attrCtx == NULL);
+
GSSEAP_ASSERT
(major == GSS_S_COMPLETE || name->attrCtx == NULL);
if (GSS_ERROR(major))
delete ctx;
if (GSS_ERROR(major))
delete ctx;
@@
-1048,7
+1050,7
@@
gssEapDuplicateAttrContext(OM_uint32 *minor,
gss_eap_attr_ctx *ctx = NULL;
OM_uint32 major = GSS_S_FAILURE;
gss_eap_attr_ctx *ctx = NULL;
OM_uint32 major = GSS_S_FAILURE;
-
assert
(out->attrCtx == NULL);
+
GSSEAP_ASSERT
(out->attrCtx == NULL);
if (in->attrCtx == NULL) {
*minor = 0;
if (in->attrCtx == NULL) {
*minor = 0;
@@
-1073,7
+1075,7
@@
gssEapDuplicateAttrContext(OM_uint32 *minor,
major = in->attrCtx->mapException(minor, e);
}
major = in->attrCtx->mapException(minor, e);
}
-
assert
(major == GSS_S_COMPLETE || out->attrCtx == NULL);
+
GSSEAP_ASSERT
(major == GSS_S_COMPLETE || out->attrCtx == NULL);
if (GSS_ERROR(major))
delete ctx;
if (GSS_ERROR(major))
delete ctx;
@@
-1155,7
+1157,7
@@
gssEapCreateAttrContext(OM_uint32 *minor,
gss_eap_attr_ctx *ctx = NULL;
OM_uint32 major;
gss_eap_attr_ctx *ctx = NULL;
OM_uint32 major;
-
assert
(gssCtx != GSS_C_NO_CONTEXT);
+
GSSEAP_ASSERT
(gssCtx != GSS_C_NO_CONTEXT);
*pAttrContext = NULL;
*pAttrContext = NULL;