Author: damitha
Date: Wed Jan 9 00:22:06 2008
New Revision: 610303
URL: http://svn.apache.org/viewvc?rev=610303&view=rev
Log:
Fixing memory leaks
Modified:
webservices/sandesha/trunk/c/include/sandesha2_close_seq.h
webservices/sandesha/trunk/c/include/sandesha2_close_seq_res.h
webservices/sandesha/trunk/c/include/sandesha2_create_seq.h
webservices/sandesha/trunk/c/include/sandesha2_create_seq_res.h
webservices/sandesha/trunk/c/include/sandesha2_last_msg.h
webservices/sandesha/trunk/c/include/sandesha2_terminate_seq.h
webservices/sandesha/trunk/c/include/sandesha2_terminate_seq_res.h
webservices/sandesha/trunk/c/src/core/sandesha2_msg_ctx.c
webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c
webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c
webservices/sandesha/trunk/c/src/storage/sqlite/msg_store_bean.c
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_next_msg_mgr.c
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
webservices/sandesha/trunk/c/src/util/msg_init.c
webservices/sandesha/trunk/c/src/util/seq_mgr.c
webservices/sandesha/trunk/c/src/wsrm/close_seq.c
webservices/sandesha/trunk/c/src/wsrm/close_seq_res.c
webservices/sandesha/trunk/c/src/wsrm/create_seq.c
webservices/sandesha/trunk/c/src/wsrm/create_seq_res.c
webservices/sandesha/trunk/c/src/wsrm/last_msg.c
webservices/sandesha/trunk/c/src/wsrm/msg_number.c
webservices/sandesha/trunk/c/src/wsrm/rm_elements.c
webservices/sandesha/trunk/c/src/wsrm/seq_ack.c
webservices/sandesha/trunk/c/src/wsrm/sequence.c
webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c
webservices/sandesha/trunk/c/src/wsrm/terminate_seq_res.c
Modified: webservices/sandesha/trunk/c/include/sandesha2_close_seq.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_close_seq.h?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_close_seq.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_close_seq.h Wed Jan 9
00:22:06 2008
@@ -51,6 +51,11 @@
sandesha2_iom_rm_part_t part;
};
+axis2_status_t AXIS2_CALL
+sandesha2_close_seq_free_void_arg(
+ void *close_seq,
+ const axutil_env_t *env);
+
AXIS2_EXTERN sandesha2_close_seq_t* AXIS2_CALL
sandesha2_close_seq_create(
const axutil_env_t *env,
Modified: webservices/sandesha/trunk/c/include/sandesha2_close_seq_res.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_close_seq_res.h?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_close_seq_res.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_close_seq_res.h Wed Jan 9
00:22:06 2008
@@ -51,6 +51,11 @@
sandesha2_iom_rm_part_t part;
};
+axis2_status_t AXIS2_CALL
+sandesha2_close_seq_res_free_void_arg(
+ void *close_seq_res,
+ const axutil_env_t *env);
+
AXIS2_EXTERN sandesha2_close_seq_res_t* AXIS2_CALL
sandesha2_close_seq_res_create(
const axutil_env_t *env,
Modified: webservices/sandesha/trunk/c/include/sandesha2_create_seq.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_create_seq.h?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_create_seq.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_create_seq.h Wed Jan 9
00:22:06 2008
@@ -52,6 +52,11 @@
sandesha2_iom_rm_part_t part;
};
+axis2_status_t AXIS2_CALL
+sandesha2_create_seq_free_void_arg(
+ void *create_seq,
+ const axutil_env_t *env);
+
AXIS2_EXTERN sandesha2_create_seq_t* AXIS2_CALL
sandesha2_create_seq_create(
const axutil_env_t *env,
Modified: webservices/sandesha/trunk/c/include/sandesha2_create_seq_res.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_create_seq_res.h?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_create_seq_res.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_create_seq_res.h Wed Jan 9
00:22:06 2008
@@ -50,6 +50,11 @@
sandesha2_iom_rm_part_t part;
};
+axis2_status_t AXIS2_CALL
+sandesha2_create_seq_res_free_void_arg(
+ void *create_seq_res,
+ const axutil_env_t *env);
+
AXIS2_EXTERN sandesha2_create_seq_res_t* AXIS2_CALL
sandesha2_create_seq_res_create(
const axutil_env_t *env,
Modified: webservices/sandesha/trunk/c/include/sandesha2_last_msg.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_last_msg.h?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_last_msg.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_last_msg.h Wed Jan 9
00:22:06 2008
@@ -48,6 +48,11 @@
sandesha2_iom_rm_element_t element;
};
+axis2_status_t AXIS2_CALL
+sandesha2_last_msg_free_void_arg(
+ void *last_msg,
+ const axutil_env_t *env);
+
AXIS2_EXTERN sandesha2_last_msg_t* AXIS2_CALL
sandesha2_last_msg_create(
const axutil_env_t *env,
Modified: webservices/sandesha/trunk/c/include/sandesha2_terminate_seq.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_terminate_seq.h?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_terminate_seq.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_terminate_seq.h Wed Jan 9
00:22:06 2008
@@ -50,6 +50,11 @@
sandesha2_iom_rm_part_t part;
};
+axis2_status_t AXIS2_CALL
+sandesha2_terminate_seq_free_void_arg(
+ void *terminate_seq,
+ const axutil_env_t *env);
+
AXIS2_EXTERN sandesha2_terminate_seq_t* AXIS2_CALL
sandesha2_terminate_seq_create(
const axutil_env_t *env,
Modified: webservices/sandesha/trunk/c/include/sandesha2_terminate_seq_res.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_terminate_seq_res.h?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_terminate_seq_res.h
(original)
+++ webservices/sandesha/trunk/c/include/sandesha2_terminate_seq_res.h Wed Jan
9 00:22:06 2008
@@ -51,6 +51,11 @@
sandesha2_iom_rm_part_t part;
};
+axis2_status_t AXIS2_CALL
+sandesha2_terminate_seq_res_free_void_arg(
+ void *terminate_seq_res,
+ const axutil_env_t *env);
+
AXIS2_EXTERN sandesha2_terminate_seq_res_t* AXIS2_CALL
sandesha2_terminate_seq_res_create(
const axutil_env_t *env,
Modified: webservices/sandesha/trunk/c/src/core/sandesha2_msg_ctx.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/core/sandesha2_msg_ctx.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/core/sandesha2_msg_ctx.c (original)
+++ webservices/sandesha/trunk/c/src/core/sandesha2_msg_ctx.c Wed Jan 9
00:22:06 2008
@@ -86,6 +86,20 @@
}
if(rm_msg_ctx->msg_parts)
{
+ axutil_hash_index_t *hi = NULL;
+ for(hi = axutil_hash_first(rm_msg_ctx->msg_parts, env); NULL != hi;
+ hi = axutil_hash_next(env, hi))
+ {
+ sandesha2_iom_rm_part_t *part = NULL;
+ void *key = NULL;
+ void *value = NULL;
+
+ axutil_hash_this(hi, (const void **) &key, NULL, &value);
+ part = (sandesha2_iom_rm_part_t*)value;
+ if(key)
+ AXIS2_FREE(env->allocator, key);
+ sandesha2_iom_rm_part_free(part, env);
+ }
axutil_hash_free(rm_msg_ctx->msg_parts, env);
rm_msg_ctx->msg_parts = NULL;
}
Modified: webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c
(original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c Wed Jan
9 00:22:06 2008
@@ -254,11 +254,28 @@
sandesha2_sender_bean_set_resend(input_bean, env, AXIS2_TRUE);
retrans_list = sandesha2_sender_mgr_find_by_sender_bean(sender_mgr, env,
input_bean);
-
+ if(input_bean)
+ {
+ sandesha2_sender_bean_free(input_bean, env);
+ }
acked_list = axutil_array_list_create(env, 0);
if(!acked_list)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ if(retrans_list)
+ {
+ int size = 0;
+ int j = 0;
+ size = axutil_array_list_size(retrans_list, env);
+ for(j = 0; j < size; j++)
+ {
+ sandesha2_sender_bean_t *temp =
+ axutil_array_list_get(retrans_list, env, j);
+ if(temp)
+ sandesha2_sender_bean_free(temp, env);
+ }
+ axutil_array_list_free(retrans_list, env);
+ }
if(int_seq_id)
AXIS2_FREE(env->allocator, int_seq_id);
if(seq_prop_mgr)
@@ -273,6 +290,7 @@
sandesha2_storage_mgr_free(storage_mgr, env);
return AXIS2_FAILURE;
}
+
if(ack_range_list)
size = axutil_array_list_size(ack_range_list, env);
for(i = 0; i < size; i++)
@@ -308,6 +326,20 @@
axutil_array_list_add(acked_list, env, add_no);
}
}
+ if(retrans_list)
+ {
+ int size = 0;
+ int j = 0;
+ size = axutil_array_list_size(retrans_list, env);
+ for(j = 0; j < size; j++)
+ {
+ sandesha2_sender_bean_t *temp =
+ axutil_array_list_get(retrans_list, env, j);
+ if(temp)
+ sandesha2_sender_bean_free(temp, env);
+ }
+ axutil_array_list_free(retrans_list, env);
+ }
for(i = 0; i < axutil_array_list_size(nack_list, env); i++)
{
sandesha2_nack_t *nack = NULL;
@@ -354,6 +386,17 @@
}
str_list = sandesha2_utils_array_list_to_string(env, acked_list,
SANDESHA2_ARRAY_LIST_LONG);
+ if(acked_list)
+ {
+ int j = 0, size = 0;
+ size = axutil_array_list_size(acked_list, env);
+ for(j = 0; j < size; j++)
+ {
+ void *temp = axutil_array_list_get(acked_list, env, j);
+ AXIS2_FREE(env->allocator, temp);
+ }
+ axutil_array_list_free(acked_list, env);
+ }
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]acked_list:%s",
str_list);
if(completed_bean)
{
Modified: webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c Wed Jan 9
00:22:06 2008
@@ -127,6 +127,11 @@
AXIS2_FREE(env->allocator,
create_seq_bean->create_seq_msg_store_key);
create_seq_bean->create_seq_msg_store_key = NULL;
}
+ if(create_seq_bean->ref_msg_store_key)
+ {
+ AXIS2_FREE(env->allocator, create_seq_bean->ref_msg_store_key);
+ create_seq_bean->ref_msg_store_key = NULL;
+ }
if(create_seq_bean)
{
AXIS2_FREE(env->allocator, create_seq_bean);
Modified: webservices/sandesha/trunk/c/src/storage/sqlite/msg_store_bean.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/msg_store_bean.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/msg_store_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/msg_store_bean.c Wed Jan 9
00:22:06 2008
@@ -88,6 +88,81 @@
sandesha2_msg_store_bean_t *msg_store_bean,
const axutil_env_t *env)
{
+ if(msg_store_bean->msg_id)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->msg_id);
+ msg_store_bean->msg_id = NULL;
+ }
+ if(msg_store_bean->stored_key)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->stored_key);
+ msg_store_bean->stored_key = NULL;
+ }
+ if(msg_store_bean->soap_env_str)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->soap_env_str);
+ msg_store_bean->soap_env_str = NULL;
+ }
+ if(msg_store_bean->op)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->op);
+ msg_store_bean->op = NULL;
+ }
+ if(msg_store_bean->svc)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->svc);
+ msg_store_bean->svc = NULL;
+ }
+ if(msg_store_bean->svc_grp)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->svc_grp);
+ msg_store_bean->svc_grp = NULL;
+ }
+ if(msg_store_bean->op_mep)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->op_mep);
+ msg_store_bean->op_mep = NULL;
+ }
+ if(msg_store_bean->to_url)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->to_url);
+ msg_store_bean->to_url = NULL;
+ }
+ if(msg_store_bean->reply_to)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->reply_to);
+ msg_store_bean->reply_to = NULL;
+ }
+ if(msg_store_bean->transport_to)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->transport_to);
+ msg_store_bean->transport_to = NULL;
+ }
+ if(msg_store_bean->execution_chain_str)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->execution_chain_str);
+ msg_store_bean->execution_chain_str = NULL;
+ }
+ if(msg_store_bean->msg_recv_str)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->msg_recv_str);
+ msg_store_bean->msg_recv_str = NULL;
+ }
+ if(msg_store_bean->in_msg_store_key)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->in_msg_store_key);
+ msg_store_bean->in_msg_store_key = NULL;
+ }
+ if(msg_store_bean->persistent_property_str)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->persistent_property_str);
+ msg_store_bean->persistent_property_str = NULL;
+ }
+ if(msg_store_bean->action)
+ {
+ AXIS2_FREE(env->allocator, msg_store_bean->action);
+ msg_store_bean->action = NULL;
+ }
if(msg_store_bean)
{
AXIS2_FREE(env->allocator, msg_store_bean);
Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c Wed
Jan 9 00:22:06 2008
@@ -200,6 +200,11 @@
AXIS2_FREE(env->allocator, bean_mgr->dbname);
bean_mgr->dbname = NULL;
}
+ if(bean_mgr->mutex)
+ {
+ axutil_thread_mutex_destroy(bean_mgr->mutex);
+ bean_mgr->mutex = NULL;
+ }
if(bean_mgr)
{
AXIS2_FREE(env->allocator, bean_mgr);
Modified:
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_next_msg_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_next_msg_mgr.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_next_msg_mgr.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_next_msg_mgr.c
Wed Jan 9 00:22:06 2008
@@ -420,7 +420,6 @@
" and internal_seq_id='%s'", internal_seq_id);
}
sprintf(sql_find + axutil_strlen(sql_find), ";");
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "next_msg_mgr_find:%s", sql_find);
find_list = sandesha2_permanent_bean_mgr_find(next_msg_mgr_impl->bean_mgr,
env, sandesha2_next_msg_find_callback, sql_find);
Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c Wed
Jan 9 00:22:06 2008
@@ -557,7 +557,6 @@
" and send = %d", send);
}
sprintf(sql_find + axutil_strlen(sql_find), ";");
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "sql_find_by_sender_bean:%s",
sql_find);
find_list = sandesha2_permanent_bean_mgr_find(sender_mgr_impl->bean_mgr,
env,
sandesha2_sender_find_callback, sql_find);
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
Modified:
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c Wed
Jan 9 00:22:06 2008
@@ -292,6 +292,8 @@
sandesha2_msg_store_bean_set_stored_key(msg_store_bean, env, key);
sandesha2_permanent_bean_mgr_update_msg_store_bean(storage_mgr_impl->bean_mgr,
env, msg_store_bean);
+ if(msg_store_bean)
+ sandesha2_msg_store_bean_free(msg_store_bean, env);
return AXIS2_SUCCESS;
}
Modified: webservices/sandesha/trunk/c/src/util/msg_init.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_init.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_init.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_init.c Wed Jan 9 00:22:06 2008
@@ -135,7 +135,7 @@
ctx = axis2_msg_ctx_get_base(msg_ctx, env);
prop = axis2_ctx_get_property(ctx, env, AXIS2_WSA_VERSION);
if(prop)
- addressing_ns = (axis2_char_t *) axutil_property_get_value(prop, env);
+ addressing_ns = axutil_strdup(env, axutil_property_get_value(prop,
env));
if(!addressing_ns && !axis2_msg_ctx_get_server_side(msg_ctx, env))
{
@@ -143,6 +143,8 @@
}
if(addressing_ns)
rm_elements = sandesha2_rm_elements_create(env, addressing_ns);
+ if(addressing_ns)
+ AXIS2_FREE(env->allocator, addressing_ns);
if(!rm_elements)
return AXIS2_FAILURE;
envelope = axis2_msg_ctx_get_soap_envelope(msg_ctx, env);
Modified: webservices/sandesha/trunk/c/src/util/seq_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/seq_mgr.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/seq_mgr.c Wed Jan 9 00:22:06 2008
@@ -221,7 +221,7 @@
last_activated_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr,
env,
property_key, SANDESHA2_SEQ_PROP_LAST_ACTIVATED_TIME);
- if(last_activated_bean == NULL)
+ if(!last_activated_bean)
{
added = AXIS2_TRUE;
last_activated_bean = sandesha2_seq_property_bean_create(env);
@@ -240,6 +240,10 @@
else
{
sandesha2_seq_property_mgr_update(seq_prop_mgr, env,
last_activated_bean);
+ }
+ if(last_activated_bean)
+ {
+ sandesha2_seq_property_bean_free(last_activated_bean, env);
}
return AXIS2_SUCCESS;
}
Modified: webservices/sandesha/trunk/c/src/wsrm/close_seq.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/close_seq.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/close_seq.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/close_seq.c Wed Jan 9 00:22:06 2008
@@ -125,6 +125,16 @@
return &(close_seq_impl->close_seq);
}
+axis2_status_t AXIS2_CALL
+sandesha2_close_seq_free_void_arg(
+ void *seq,
+ const axutil_env_t *env)
+{
+ sandesha2_iom_rm_element_t *seq_l = NULL;
+
+ seq_l = (sandesha2_iom_rm_element_t *) seq;
+ return sandesha2_close_seq_free(seq_l, env);
+}
axis2_status_t AXIS2_CALL
sandesha2_close_seq_free (
Modified: webservices/sandesha/trunk/c/src/wsrm/close_seq_res.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/close_seq_res.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/close_seq_res.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/close_seq_res.c Wed Jan 9 00:22:06
2008
@@ -131,6 +131,16 @@
return &(close_seq_res_impl->close_seq_res);
}
+axis2_status_t AXIS2_CALL
+sandesha2_close_seq_res_free_void_arg(
+ void *seq,
+ const axutil_env_t *env)
+{
+ sandesha2_iom_rm_element_t *seq_l = NULL;
+
+ seq_l = (sandesha2_iom_rm_element_t *) seq;
+ return sandesha2_close_seq_res_free(seq_l, env);
+}
axis2_status_t AXIS2_CALL
sandesha2_close_seq_res_free (sandesha2_iom_rm_element_t *close_seq_res,
Modified: webservices/sandesha/trunk/c/src/wsrm/create_seq.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/create_seq.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/create_seq.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/create_seq.c Wed Jan 9 00:22:06 2008
@@ -137,6 +137,16 @@
return &(create_seq_impl->create_seq);
}
+axis2_status_t AXIS2_CALL
+sandesha2_create_seq_free_void_arg(
+ void *create_seq,
+ const axutil_env_t *env)
+{
+ sandesha2_iom_rm_element_t *create_seq_l = NULL;
+
+ create_seq_l = (sandesha2_iom_rm_element_t *) create_seq;
+ return sandesha2_create_seq_free(create_seq_l, env);
+}
static axis2_status_t AXIS2_CALL
sandesha2_create_seq_free (
@@ -144,7 +154,6 @@
const axutil_env_t *env)
{
sandesha2_create_seq_impl_t *create_seq_impl = NULL;
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
create_seq_impl = SANDESHA2_INTF_TO_IMPL(create_seq);
if(create_seq_impl->rm_ns_val)
Modified: webservices/sandesha/trunk/c/src/wsrm/create_seq_res.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/create_seq_res.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/create_seq_res.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/create_seq_res.c Wed Jan 9 00:22:06
2008
@@ -144,6 +144,16 @@
return &(create_seq_res_impl->create_seq_res);
}
+axis2_status_t AXIS2_CALL
+sandesha2_create_seq_res_free_void_arg(
+ void *seq,
+ const axutil_env_t *env)
+{
+ sandesha2_iom_rm_element_t *seq_l = NULL;
+
+ seq_l = (sandesha2_iom_rm_element_t *) seq;
+ return sandesha2_create_seq_res_free(seq_l, env);
+}
static axis2_status_t AXIS2_CALL
sandesha2_create_seq_res_free (
Modified: webservices/sandesha/trunk/c/src/wsrm/last_msg.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/last_msg.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/last_msg.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/last_msg.c Wed Jan 9 00:22:06 2008
@@ -108,13 +108,23 @@
return &(last_msg_impl->last_msg);
}
+axis2_status_t AXIS2_CALL
+sandesha2_last_msg_free_void_arg(
+ void *last_msg,
+ const axutil_env_t *env)
+{
+ sandesha2_iom_rm_element_t *last_msg_l = NULL;
+
+ last_msg_l = (sandesha2_iom_rm_element_t *) last_msg;
+ return sandesha2_last_msg_free(last_msg_l, env);
+}
axis2_status_t AXIS2_CALL
-sandesha2_last_msg_free (sandesha2_iom_rm_element_t *last_msg,
- const axutil_env_t *env)
+sandesha2_last_msg_free (
+ sandesha2_iom_rm_element_t *last_msg,
+ const axutil_env_t *env)
{
sandesha2_last_msg_impl_t *last_msg_impl = NULL;
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
last_msg_impl = SANDESHA2_INTF_TO_IMPL(last_msg);
if(NULL != last_msg_impl->ns_val)
Modified: webservices/sandesha/trunk/c/src/wsrm/msg_number.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/msg_number.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/msg_number.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/msg_number.c Wed Jan 9 00:22:06 2008
@@ -67,10 +67,11 @@
/***************************** End of function headers
************************/
AXIS2_EXTERN sandesha2_msg_number_t* AXIS2_CALL
-sandesha2_msg_number_create(const axutil_env_t *env, axis2_char_t *ns_val)
+sandesha2_msg_number_create(
+ const axutil_env_t *env,
+ axis2_char_t *ns_val)
{
sandesha2_msg_number_impl_t *msg_number_impl = NULL;
- AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, ns_val, NULL);
if(AXIS2_FALSE == sandesha2_msg_number_is_namespace_supported(
@@ -133,11 +134,11 @@
axis2_status_t AXIS2_CALL
-sandesha2_msg_number_free (sandesha2_iom_rm_element_t *msg_num,
- const axutil_env_t *env)
+sandesha2_msg_number_free (
+ sandesha2_iom_rm_element_t *msg_num,
+ const axutil_env_t *env)
{
sandesha2_msg_number_impl_t *msg_number_impl = NULL;
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg_number_impl = SANDESHA2_INTF_TO_IMPL(msg_num);
if(NULL != msg_number_impl->ns_val)
@@ -166,7 +167,6 @@
const axutil_env_t *env)
{
sandesha2_msg_number_impl_t *msg_number_impl = NULL;
- AXIS2_ENV_CHECK(env, NULL);
msg_number_impl = SANDESHA2_INTF_TO_IMPL(msg_num);
return msg_number_impl->ns_val;
@@ -174,8 +174,9 @@
void* AXIS2_CALL
-sandesha2_msg_number_from_om_node(sandesha2_iom_rm_element_t *msg_num,
- const axutil_env_t *env, axiom_node_t *om_node)
+sandesha2_msg_number_from_om_node(
+ sandesha2_iom_rm_element_t *msg_num,
+ const axutil_env_t *env, axiom_node_t *om_node)
{
sandesha2_msg_number_impl_t *msg_number_impl = NULL;
axiom_element_t *om_element = NULL;
@@ -184,33 +185,34 @@
axutil_qname_t *mn_qname = NULL;
axis2_char_t *mn_str = NULL;
- AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, om_node, NULL);
msg_number_impl = SANDESHA2_INTF_TO_IMPL(msg_num);
om_element = axiom_node_get_data_element(om_node, env);
- if(NULL == om_element)
+ if(!om_element)
{
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_OM_ELEMENT,
AXIS2_FAILURE);
return NULL;
}
mn_qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_MSG_NUMBER,
- msg_number_impl->ns_val, NULL);
- if(NULL == mn_qname)
+ msg_number_impl->ns_val, NULL);
+ if(!mn_qname)
{
return NULL;
}
mn_part = axiom_element_get_first_child_with_qname(om_element, env,
- mn_qname, om_node, &mn_node);
- if(NULL == mn_part)
+ mn_qname, om_node, &mn_node);
+ if(mn_qname)
+ axutil_qname_free(mn_qname, env);
+ if(!mn_part)
{
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_OM_ELEMENT,
AXIS2_FAILURE);
return NULL;
}
mn_str = axiom_element_get_text(mn_part, env, mn_node);
- if(NULL == mn_str)
+ if(!mn_str)
{
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_EMPTY_OM_ELEMENT,
AXIS2_FAILURE);
Modified: webservices/sandesha/trunk/c/src/wsrm/rm_elements.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/rm_elements.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/rm_elements.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/rm_elements.c Wed Jan 9 00:22:06 2008
@@ -83,7 +83,7 @@
sandesha2_rm_elements_free(
sandesha2_rm_elements_t *rm_elements,
const axutil_env_t *env)
-{
+{
if(rm_elements->addr_ns_val)
{
AXIS2_FREE(env->allocator, rm_elements->addr_ns_val);
@@ -676,7 +676,13 @@
headers = axiom_soap_header_get_header_blocks_with_namespace_uri(
soap_header, env, AXIS2_WSA_NAMESPACE_SUBMISSION);
if(headers && 0 < axutil_array_list_size(headers, env))
+ {
+ if(headers)
+ axutil_array_list_free(headers, env);
return AXIS2_WSA_NAMESPACE_SUBMISSION;
+ }
+ if(headers)
+ axutil_array_list_free(headers, env);
soap_header_node = axiom_soap_header_get_base_node(soap_header, env);
soap_header_element = axiom_node_get_data_element(soap_header_node,
Modified: webservices/sandesha/trunk/c/src/wsrm/seq_ack.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/seq_ack.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/seq_ack.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/seq_ack.c Wed Jan 9 00:22:06 2008
@@ -145,6 +145,16 @@
return &(seq_ack_impl->seq_ack);
}
+axis2_status_t AXIS2_CALL
+sandesha2_seq_ack_free_void_arg(
+ void *seq,
+ const axutil_env_t *env)
+{
+ sandesha2_iom_rm_element_t *seq_l = NULL;
+
+ seq_l = (sandesha2_iom_rm_element_t *) seq;
+ return sandesha2_seq_ack_free(seq_l, env);
+}
static axis2_status_t AXIS2_CALL
sandesha2_seq_ack_free (
Modified: webservices/sandesha/trunk/c/src/wsrm/sequence.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/sequence.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/sequence.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/sequence.c Wed Jan 9 00:22:06 2008
@@ -149,7 +149,6 @@
const axutil_env_t *env)
{
sandesha2_iom_rm_element_t *seq_l = NULL;
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
seq_l = (sandesha2_iom_rm_element_t *) seq;
return sandesha2_seq_free(seq_l, env);
@@ -161,9 +160,7 @@
const axutil_env_t *env)
{
sandesha2_seq_impl_t *seq_impl = NULL;
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
seq_impl = SANDESHA2_INTF_TO_IMPL(seq);
-
if(seq_impl->ns_val)
{
AXIS2_FREE(env->allocator, seq_impl->ns_val);
@@ -171,7 +168,22 @@
}
seq_impl->identifier = NULL;
seq_impl->msg_num = NULL;
- seq_impl->last_msg = NULL;
+ if(seq_impl->last_msg)
+ {
+ sandesha2_last_msg_free_void_arg(
+ (sandesha2_iom_rm_element_t *)seq_impl->last_msg, env);
+ seq_impl->last_msg = NULL;
+ }
+ if(seq_impl->seq.part.element.ops)
+ {
+ AXIS2_FREE(env->allocator, seq_impl->seq.part.element.ops);
+ seq_impl->seq.part.element.ops = NULL;
+ }
+ if(seq_impl->seq.part.ops)
+ {
+ AXIS2_FREE(env->allocator, seq_impl->seq.part.ops);
+ seq_impl->seq.part.ops = NULL;
+ }
if(seq->ops)
AXIS2_FREE(env->allocator, seq->ops);
Modified: webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c Wed Jan 9 00:22:06
2008
@@ -129,6 +129,16 @@
return &(terminate_seq_impl->terminate_seq);
}
+axis2_status_t AXIS2_CALL
+sandesha2_terminate_seq_free_void_arg(
+ void *seq,
+ const axutil_env_t *env)
+{
+ sandesha2_iom_rm_element_t *seq_l = NULL;
+
+ seq_l = (sandesha2_iom_rm_element_t *) seq;
+ return sandesha2_terminate_seq_free(seq_l, env);
+}
axis2_status_t AXIS2_CALL
sandesha2_terminate_seq_free (sandesha2_iom_rm_element_t *terminate_seq,
Modified: webservices/sandesha/trunk/c/src/wsrm/terminate_seq_res.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/terminate_seq_res.c?rev=610303&r1=610302&r2=610303&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/terminate_seq_res.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/terminate_seq_res.c Wed Jan 9
00:22:06 2008
@@ -135,6 +135,16 @@
return &(terminate_seq_res_impl->terminate_seq_res);
}
+axis2_status_t AXIS2_CALL
+sandesha2_terminate_seq_res_free_void_arg(
+ void *seq,
+ const axutil_env_t *env)
+{
+ sandesha2_iom_rm_element_t *seq_l = NULL;
+
+ seq_l = (sandesha2_iom_rm_element_t *) seq;
+ return sandesha2_terminate_seq_res_free(seq_l, env);
+}
axis2_status_t AXIS2_CALL
sandesha2_terminate_seq_res_free (sandesha2_iom_rm_element_t
*terminate_seq_res,
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]