You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by ka...@apache.org on 2007/09/14 13:07:04 UTC
svn commit: r575621 - in /webservices/rampart/trunk/c:
include/rampart_sec_processed_result.h samples/server/sec_echo/Makefile.am
src/util/rampart_sec_processed_result.c src/util/rampart_util.c
Author: kaushalye
Date: Fri Sep 14 04:07:04 2007
New Revision: 575621
URL: http://svn.apache.org/viewvc?rev=575621&view=rev
Log:
memory leak fix in security processed result hash table
Modified:
webservices/rampart/trunk/c/include/rampart_sec_processed_result.h
webservices/rampart/trunk/c/samples/server/sec_echo/Makefile.am
webservices/rampart/trunk/c/src/util/rampart_sec_processed_result.c
webservices/rampart/trunk/c/src/util/rampart_util.c
Modified: webservices/rampart/trunk/c/include/rampart_sec_processed_result.h
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/include/rampart_sec_processed_result.h?rev=575621&r1=575620&r2=575621&view=diff
==============================================================================
--- webservices/rampart/trunk/c/include/rampart_sec_processed_result.h (original)
+++ webservices/rampart/trunk/c/include/rampart_sec_processed_result.h Fri Sep 14 04:07:04 2007
@@ -84,6 +84,10 @@
rampart_print_security_processed_results_set(const axutil_env_t *env,
axis2_msg_ctx_t *msg_ctx);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ rampart_security_processed_results_free(const axutil_env_t *env,
+ axutil_hash_t* sec_processed_results);
/* @} */
#ifdef __cplusplus
}
Modified: webservices/rampart/trunk/c/samples/server/sec_echo/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/server/sec_echo/Makefile.am?rev=575621&r1=575620&r2=575621&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/server/sec_echo/Makefile.am (original)
+++ webservices/rampart/trunk/c/samples/server/sec_echo/Makefile.am Fri Sep 14 04:07:04 2007
@@ -7,5 +7,12 @@
noinst_HEADERS = echo.h
SUBDIRS =
libsec_echo_la_SOURCES = echo.c echo_skeleton.c
-libsec_echo_la_LIBADD =
-INCLUDES = @AXIS2INC@
+libsec_echo_la_LIBADD = $(LDFLAGS) \
+ -L$(AXIS2C_HOME)/lib \
+ -L$(AXIS2C_HOME)/modules/rampart \
+ -lmod_rampart
+
+
+INCLUDES = @AXIS2INC@ \
+ -I$(AXIS2C_HOME)/include \
+ -I ../../../include
Modified: webservices/rampart/trunk/c/src/util/rampart_sec_processed_result.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/util/rampart_sec_processed_result.c?rev=575621&r1=575620&r2=575621&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/util/rampart_sec_processed_result.c (original)
+++ webservices/rampart/trunk/c/src/util/rampart_sec_processed_result.c Fri Sep 14 04:07:04 2007
@@ -57,6 +57,14 @@
return axutil_hash_get(sec_processed_results, key, AXIS2_HASH_KEY_STRING);
}
+AXIS2_EXTERN void AXIS2_CALL
+rampart_security_processed_results_free(const axutil_env_t *env,
+ axutil_hash_t* sec_processed_results)
+{
+ axutil_hash_free(sec_processed_results, env);
+ sec_processed_results = NULL;
+}
+
AXIS2_EXTERN axis2_status_t AXIS2_CALL
rampart_set_security_processed_results_property(const axutil_env_t *env,
axis2_msg_ctx_t *msg_ctx)
@@ -69,9 +77,12 @@
}
sec_processed_results = axutil_hash_make(env);
- sec_processed_results_prop = axutil_property_create(env);
- axutil_property_set_value(sec_processed_results_prop, env, sec_processed_results);
+ sec_processed_results_prop = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST ,
+ AXIS2_TRUE, (void *)axutil_hash_free/*rampart_security_processed_results_free*/, sec_processed_results);
+
+ /*sec_processed_results_prop = axutil_property_create(env);
+ axutil_property_set_value(sec_processed_results_prop, env, sec_processed_results);*/
axis2_msg_ctx_set_property(msg_ctx, env, RAMPART_SECURITY_PROCESSED_RESULTS, sec_processed_results_prop);
return AXIS2_SUCCESS;
@@ -98,6 +109,7 @@
return sec_processed_results;
}
+
AXIS2_EXTERN void AXIS2_CALL
rampart_print_security_processed_results_set(const axutil_env_t *env,
Modified: webservices/rampart/trunk/c/src/util/rampart_util.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/util/rampart_util.c?rev=575621&r1=575620&r2=575621&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/util/rampart_util.c (original)
+++ webservices/rampart/trunk/c/src/util/rampart_util.c Fri Sep 14 04:07:04 2007
@@ -55,7 +55,7 @@
dll_desc = axutil_dll_desc_create(env);
axutil_dll_desc_set_name(dll_desc, env, module_name);
impl_info_param = axutil_param_create(env, NULL, dll_desc);
- /*axutil_param_set_value(impl_info_param, env, dll_desc);*/
+ /*Set the free function*/
axutil_param_set_value_free(impl_info_param, env, axutil_dll_desc_free_void_arg);
axutil_class_loader_init(env);
ptr = axutil_class_loader_create_dll(env, impl_info_param);