Author: damitha
Date: Thu Jan 24 07:29:27 2008
New Revision: 614901
URL: http://svn.apache.org/viewvc?rev=614901&view=rev
Log:
fixing memory leaks
Modified:
webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
webservices/sandesha/trunk/c/src/storage/sqlite/msg_store_bean.c
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
webservices/sandesha/trunk/c/src/workers/sender_worker.c
webservices/sandesha/trunk/c/src/wsrm/sequence.c
Modified: webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c?rev=614901&r1=614900&r2=614901&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
(original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Thu Jan
24 07:29:27 2008
@@ -227,7 +227,7 @@
sandesha2_seq_property_bean_t *acks_to_bean = NULL;
sandesha2_seq_property_bean_t *to_bean = NULL;
axis2_char_t *acks_to_str = NULL;
- axis2_endpoint_ref_t *acks_to = NULL;
+ /*axis2_endpoint_ref_t *acks_to = NULL;*/
axis2_bool_t back_channel_free = AXIS2_FALSE;
axis2_op_t *op = NULL;
int mep = -1;
@@ -752,9 +752,11 @@
sandesha2_invoker_mgr_free(invoker_mgr, env);
if(storage_mgr)
sandesha2_storage_mgr_free(storage_mgr, env);
+ if(acks_to_bean)
+ sandesha2_seq_property_bean_free(acks_to_bean, env);
return AXIS2_FAILURE;
}
- acks_to = axis2_endpoint_ref_create(env, acks_to_str);
+ /*acks_to = axis2_endpoint_ref_create(env, acks_to_str);*/
mep = axis2_op_get_axis_specific_mep_const(op, env);
back_channel_free = (reply_to_addr && !sandesha2_utils_is_anon_uri(env,
reply_to_addr)) || AXIS2_MEP_CONSTANT_IN_ONLY == mep;
@@ -785,6 +787,8 @@
if(rm_version)
AXIS2_FREE(env->allocator, rm_version);
+ if(acks_to_bean)
+ sandesha2_seq_property_bean_free(acks_to_bean, env);
if(seq_prop_mgr)
sandesha2_seq_property_mgr_free(seq_prop_mgr, env);
if(create_seq_mgr)
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=614901&r1=614900&r2=614901&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 Thu Jan 24
07:29:27 2008
@@ -28,8 +28,6 @@
axis2_char_t * stored_key;
axis2_char_t * msg_id;
axis2_char_t * soap_env_str;
- int soap_version;
- AXIS2_TRANSPORT_ENUMS transport_out;
axis2_char_t * op;
axis2_char_t * svc;
axis2_char_t * svc_grp;
@@ -38,19 +36,20 @@
axis2_char_t * reply_to;
axis2_char_t * transport_to;
axis2_char_t * execution_chain_str;
- int flow;
axis2_char_t * msg_recv_str;
- axis2_bool_t svr_side;
axis2_char_t * in_msg_store_key;
axis2_char_t * persistent_property_str;
axis2_char_t * action;
+ int soap_version;
+ AXIS2_TRANSPORT_ENUMS transport_out;
+ int flow;
+ axis2_bool_t svr_side;
};
AXIS2_EXTERN sandesha2_msg_store_bean_t* AXIS2_CALL
sandesha2_msg_store_bean_create(const axutil_env_t *env)
{
sandesha2_msg_store_bean_t *msg_store_bean = NULL;
- AXIS2_ENV_CHECK(env, NULL);
msg_store_bean = (sandesha2_msg_store_bean_t*)
AXIS2_MALLOC(env->allocator,
sizeof(sandesha2_msg_store_bean_t));
@@ -63,8 +62,6 @@
msg_store_bean->stored_key = NULL;
msg_store_bean->msg_id = NULL;
msg_store_bean->soap_env_str = NULL;
- msg_store_bean->soap_version = -1;
- msg_store_bean->transport_out = -1;
msg_store_bean->op = NULL;
msg_store_bean->svc = NULL;
msg_store_bean->svc_grp = NULL;
@@ -73,12 +70,14 @@
msg_store_bean->reply_to = NULL;
msg_store_bean->transport_to = NULL;
msg_store_bean->execution_chain_str = NULL;
- msg_store_bean->flow = -1;
msg_store_bean->msg_recv_str = NULL;
- msg_store_bean->svr_side = -1;
msg_store_bean->in_msg_store_key = NULL;
msg_store_bean->persistent_property_str = NULL;
msg_store_bean->action = NULL;
+ msg_store_bean->soap_version = -1;
+ msg_store_bean->transport_out = -1;
+ msg_store_bean->flow = -1;
+ msg_store_bean->svr_side = -1;
return msg_store_bean;
}
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=614901&r1=614900&r2=614901&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 Thu
Jan 24 07:29:27 2008
@@ -266,6 +266,8 @@
sandesha2_msg_store_bean_set_stored_key(msg_store_bean, env, key);
sandesha2_permanent_bean_mgr_insert_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/workers/sender_worker.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/workers/sender_worker.c?rev=614901&r1=614900&r2=614901&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender_worker.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender_worker.c Thu Jan 24
07:29:27 2008
@@ -454,7 +454,7 @@
axis2_msg_ctx_t *res_msg_ctx = NULL;
axiom_soap_envelope_t *res_envelope = NULL;
axis2_char_t *soap_ns_uri = NULL;
- /*axis2_svc_ctx_t *svc_ctx = NULL;*/
+ axis2_svc_ctx_t *svc_ctx = NULL;
axis2_svc_grp_t *svc_grp = NULL;
axis2_svc_t *svc = NULL;
axis2_op_t *op = NULL;
@@ -518,7 +518,7 @@
op_name_str = axutil_qname_to_string(qname, env);
}
op_mep_str = (axis2_char_t *) axis2_op_get_msg_exchange_pattern(op,
env);
- if((op_name_str || op_mep_str) && svc)
+ if((op_name_str || op_mep_str))
{
axis2_op_t *op = NULL;
if(op_name_str)
@@ -563,7 +563,7 @@
}
}
/* Setting contexts TODO is this necessary? */
- svc_grp = axis2_msg_ctx_get_svc_grp(res_msg_ctx, env);
+ /*svc_grp = axis2_msg_ctx_get_svc_grp(res_msg_ctx, env);
if(svc_grp)
{
axis2_svc_grp_ctx_t *svc_grp_ctx = axis2_svc_grp_ctx_create(env,
@@ -582,7 +582,7 @@
axis2_msg_ctx_set_svc_ctx(res_msg_ctx, env, svc_ctx);
}
- }
+ }*/
op = axis2_msg_ctx_get_op(res_msg_ctx, env);
if(op)
{
@@ -611,10 +611,10 @@
else
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "AXIS2_TRANSPORT_IN
NULL");*/
- /*svc_ctx = axis2_msg_ctx_get_svc_ctx(msg_ctx, env);
+ svc_ctx = axis2_msg_ctx_get_svc_ctx(msg_ctx, env);
axis2_msg_ctx_set_svc_ctx(res_msg_ctx, env, svc_ctx);
axis2_msg_ctx_set_svc_grp_ctx(res_msg_ctx, env,
- axis2_msg_ctx_get_svc_grp_ctx(msg_ctx, env));*/
+ axis2_msg_ctx_get_svc_grp_ctx(msg_ctx, env));
if(res_envelope)
{
Modified: webservices/sandesha/trunk/c/src/wsrm/sequence.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/sequence.c?rev=614901&r1=614900&r2=614901&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/sequence.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/sequence.c Thu Jan 24 07:29:27 2008
@@ -306,6 +306,8 @@
axiom_soap_header_remove_header_block(soap_header, env, seq_qname);
sandesha2_seq_to_om_node((sandesha2_seq_t*)seq, env,
soap_header);
+ if(seq_qname)
+ axutil_qname_free(seq_qname, env);
return AXIS2_SUCCESS;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]