You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by da...@apache.org on 2008/07/28 16:05:15 UTC
svn commit: r680364 - in
/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008: ./
samples/ samples/rm_echo_single_1_0/ src/handlers/ src/msgprocessors/
src/storage/sqlite/ src/util/ src/wsrm/
Author: damitha
Date: Mon Jul 28 07:05:13 2008
New Revision: 680364
URL: http://svn.apache.org/viewvc?rev=680364&view=rev
Log:
Fixing memory leaks
Modified:
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/build.sh
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/build.sh
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_single_1_0/rm_echo_single.c
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/handlers/sandesha2_in_handler.c
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/ack_msg_processor.c
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/app_msg_processor.c
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/create_seq_res_msg_processor.c
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_storage_mgr.c
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_creator.c
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/sandesha2_utils.c
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/wsrm/seq_ack.c
Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/build.sh
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/build.sh?rev=680364&r1=680363&r2=680364&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/build.sh (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/build.sh Mon Jul 28 07:05:13 2008
@@ -1,5 +1,5 @@
#!/bin/bash
./autogen.sh
-./configure --prefix=${AXIS2C_HOME} --enable-static=no --with-axis2=${AXIS2C_HOME}/include/axis2-1.4.0
+./configure --prefix=${AXIS2C_HOME} --enable-static=no --with-axis2=${AXIS2C_HOME}/include/axis2-1.5.0
make -j30
make install
Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/build.sh
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/build.sh?rev=680364&r1=680363&r2=680364&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/build.sh (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/build.sh Mon Jul 28 07:05:13 2008
@@ -2,6 +2,6 @@
./autogen.sh
-./configure --prefix=${AXIS2C_HOME} --with-axis2=${AXIS2C_HOME}/include/axis2-1.4.0
+./configure --prefix=${AXIS2C_HOME} --with-axis2=${AXIS2C_HOME}/include/axis2-1.5.0
make -j30
make install
Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_single_1_0/rm_echo_single.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_single_1_0/rm_echo_single.c?rev=680364&r1=680363&r2=680364&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_single_1_0/rm_echo_single.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_single_1_0/rm_echo_single.c Mon Jul 28 07:05:13 2008
@@ -43,8 +43,8 @@
axis2_options_t *options = NULL;
const axis2_char_t *client_home = NULL;
axis2_svc_client_t* svc_client = NULL;
- axiom_node_t *payload = NULL;
- axiom_node_t *payload2 = NULL;
+ /*axiom_node_t *payload = NULL;
+ axiom_node_t *payload2 = NULL;*/
axiom_node_t *payload3 = NULL;
axutil_property_t *property = NULL;
axis2_char_t *offered_seq_id = NULL;
@@ -159,7 +159,7 @@
axis2_options_set_property(options, env, AXIS2_TIMEOUT_IN_SECONDS,
property);
}
- payload = build_om_payload_for_echo_svc(env, "echo1", seq_key);
+ /*payload = build_om_payload_for_echo_svc(env, "echo1", seq_key);
result = axis2_svc_client_send_receive(svc_client, env, payload);
if(result)
{
@@ -196,7 +196,7 @@
else
{
printf("\necho client two way single channel invoke FAILED!\n");
- }
+ }*/
property = axutil_property_create_with_args(env, 0, 0, 0, AXIS2_VALUE_TRUE);
axis2_options_set_property(options, env, "Sandesha2LastMessage", property);
Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/handlers/sandesha2_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/handlers/sandesha2_in_handler.c?rev=680364&r1=680363&r2=680364&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/handlers/sandesha2_in_handler.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/handlers/sandesha2_in_handler.c Mon Jul 28 07:05:13 2008
@@ -188,10 +188,17 @@
{
sandesha2_msg_ctx_free(rm_msg_ctx, env);
}
+
if(seq_prop_mgr)
{
sandesha2_seq_property_mgr_free(seq_prop_mgr, env);
}
+
+ if(sender_mgr)
+ {
+ sandesha2_sender_mgr_free(sender_mgr, env);
+ }
+
if(storage_mgr)
{
sandesha2_storage_mgr_free(storage_mgr, env);
@@ -240,10 +247,17 @@
{
sandesha2_msg_ctx_free(rm_msg_ctx, env);
}
+
if(seq_prop_mgr)
{
sandesha2_seq_property_mgr_free(seq_prop_mgr, env);
}
+
+ if(sender_mgr)
+ {
+ sandesha2_sender_mgr_free(sender_mgr, env);
+ }
+
if(storage_mgr)
{
sandesha2_storage_mgr_free(storage_mgr, env);
Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/ack_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/ack_msg_processor.c?rev=680364&r1=680363&r2=680364&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/ack_msg_processor.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/ack_msg_processor.c Mon Jul 28 07:05:13 2008
@@ -154,7 +154,7 @@
axutil_array_list_t *nack_list = NULL;
axis2_char_t *rms_sequence_id = NULL;
axis2_char_t *internal_sequence_id = NULL;
- axutil_property_t *property = NULL;
+ /*axutil_property_t *property = NULL;*/
sandesha2_sender_bean_t *input_bean = NULL;
axutil_array_list_t *retrans_list = NULL;
axutil_array_list_t *acked_list = NULL;
@@ -266,8 +266,8 @@
sandesha2_seq_mgr_update_last_activated_time(env, internal_sequence_id, seq_prop_mgr);
}
- property = axutil_property_create_with_args(env, 0, 0, 0, AXIS2_VALUE_TRUE);
- axis2_msg_ctx_set_property(msg_ctx, env, SANDESHA2_ACK_PROCSSED, property);
+ /*property = axutil_property_create_with_args(env, 0, 0, 0, AXIS2_VALUE_TRUE);
+ axis2_msg_ctx_set_property(msg_ctx, env, SANDESHA2_ACK_PROCSSED, property);*/
input_bean = sandesha2_sender_bean_create(env);
sandesha2_sender_bean_set_internal_seq_id(input_bean, env, internal_sequence_id);
Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/app_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/app_msg_processor.c?rev=680364&r1=680363&r2=680364&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/app_msg_processor.c Mon Jul 28 07:05:13 2008
@@ -470,8 +470,6 @@
}
sandesha2_seq_mgr_update_last_activated_time(env, rmd_sequence_id, seq_prop_mgr);
- msgs_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, rmd_sequence_id,
- SANDESHA2_SEQ_PROP_SERVER_COMPLETED_MESSAGES);
msg_no = sandesha2_msg_number_get_msg_num(sandesha2_seq_get_msg_num(seq, env), env);
if(0 == msg_no)
@@ -596,9 +594,11 @@
AXIS2_FREE(env->allocator, highest_in_msg_key_str);
}
+ msgs_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, rmd_sequence_id,
+ SANDESHA2_SEQ_PROP_SERVER_COMPLETED_MESSAGES);
if(msgs_bean)
{
- msgs_str = sandesha2_seq_property_bean_get_value(msgs_bean, env);
+ msgs_str = axutil_strdup(env, sandesha2_seq_property_bean_get_value(msgs_bean, env));
}
else
{
@@ -620,7 +620,11 @@
{
if(msgs_str && 0 < axutil_strlen(msgs_str))
{
- msgs_str = axutil_strcat(env, msgs_str, ",", msg_num_str, NULL);
+ axis2_char_t *tmp_str = NULL;
+
+ tmp_str = axutil_strcat(env, msgs_str, ",", msg_num_str, NULL);
+ AXIS2_FREE(env->allocator, msgs_str);
+ msgs_str = tmp_str;
}
else
{
@@ -628,11 +632,9 @@
}
sandesha2_seq_property_bean_set_value(msgs_bean, env, msgs_str);
sandesha2_seq_property_mgr_update(seq_prop_mgr, env, msgs_bean);
- if(msgs_str)
- {
- AXIS2_FREE(env->allocator, msgs_str);
- }
}
+
+ sandesha2_seq_property_bean_free(msgs_bean, env);
next_msg_bean = sandesha2_next_msg_mgr_retrieve(next_msg_mgr, env, rmd_sequence_id);
if(!next_msg_bean)
@@ -653,6 +655,12 @@
sandesha2_invoker_mgr_free(invoker_mgr, env);
if(storage_mgr)
sandesha2_storage_mgr_free(storage_mgr, env);
+
+ if(msgs_str)
+ {
+ AXIS2_FREE(env->allocator, msgs_str);
+ }
+
return AXIS2_FAILURE;
}
@@ -705,6 +713,11 @@
sandesha2_invoker_mgr_free(invoker_mgr, env);
if(storage_mgr)
sandesha2_storage_mgr_free(storage_mgr, env);
+
+ if(msgs_str)
+ {
+ AXIS2_FREE(env->allocator, msgs_str);
+ }
return AXIS2_SUCCESS;
}
@@ -758,6 +771,11 @@
sandesha2_invoker_mgr_free(invoker_mgr, env);
if(storage_mgr)
sandesha2_storage_mgr_free(storage_mgr, env);
+ if(msgs_str)
+ {
+ AXIS2_FREE(env->allocator, msgs_str);
+ }
+
return status;
}
}
@@ -824,10 +842,20 @@
{
sandesha2_storage_mgr_free(storage_mgr, env);
}
+
+ if(msgs_str)
+ {
+ AXIS2_FREE(env->allocator, msgs_str);
+ }
return AXIS2_FAILURE;
}
+ if(msgs_str)
+ {
+ AXIS2_FREE(env->allocator, msgs_str);
+ }
+
if(seq_prop_mgr)
{
sandesha2_seq_property_mgr_free(seq_prop_mgr, env);
@@ -1274,8 +1302,6 @@
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, response_relates_to_bean);
}
- storage_key = axutil_uuid_gen(env);
-
if(last_msg)
{
sandesha2_seq_property_bean_t *res_last_msg_key_bean = NULL;
@@ -1532,8 +1558,14 @@
if(!dummy_msg)
{
+ storage_key = axutil_uuid_gen(env);
+
status = sandesha2_app_msg_processor_send_app_msg(env, rm_msg_ctx, internal_sequence_id,
msg_number, storage_key, storage_mgr, create_seq_mgr, seq_prop_mgr, sender_mgr);
+ if(storage_key)
+ {
+ AXIS2_FREE(env->allocator, storage_key);
+ }
}
axis2_msg_ctx_set_paused(msg_ctx, env, AXIS2_TRUE);
@@ -1745,8 +1777,11 @@
{
rms_internal_sequence_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env,
rmd_sequence_id, SANDESHA2_SEQUENCE_PROPERTY_RMS_INTERNAL_SEQ_ID);
-
- internal_sequence_id = sandesha2_seq_property_bean_get_value(rms_internal_sequence_bean, env);
+
+ if(rms_internal_sequence_bean)
+ {
+ internal_sequence_id = sandesha2_seq_property_bean_get_value(rms_internal_sequence_bean, env);
+ }
key = axutil_uuid_gen(env);
ack_bean = sandesha2_sender_bean_create(env);
@@ -1765,10 +1800,16 @@
sandesha2_sender_bean_set_resend(ack_bean, env, AXIS2_FALSE);
sandesha2_sender_mgr_insert(sender_mgr, env, ack_bean);
+ if(rms_internal_sequence_bean)
+ {
+ sandesha2_seq_property_bean_free(rms_internal_sequence_bean, env);
+ }
+
if(ack_bean)
{
sandesha2_sender_bean_free(ack_bean, env);
}
+
property = axutil_property_create_with_args(env, 0, AXIS2_TRUE, 0, key);
axis2_msg_ctx_set_property(ack_msg_ctx, env, SANDESHA2_MESSAGE_STORE_KEY, property);
}
@@ -2040,6 +2081,11 @@
SANDESHA2_SEQUENCE_PROPERTY_RMS_SEQ_ID);
}
+ if(rms_sequence_bean)
+ {
+ sandesha2_seq_property_bean_free(rms_sequence_bean, env);
+ }
+
if(create_sequence_sender_bean)
{
sandesha2_sender_bean_free(create_sequence_sender_bean, env);
@@ -2426,7 +2472,7 @@
from_acks_to_addr = axutil_strdup(env, sandesha2_seq_property_bean_get_value(from_acks_to_bean, env));
from_acks_to_epr = axis2_endpoint_ref_create(env, from_acks_to_addr);
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "from_acks_to_address:%s", from_acks_to_addr);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "from_acks_to_address:%s", from_acks_to_addr);
if(from_acks_to_epr)
{
Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/create_seq_res_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/create_seq_res_msg_processor.c?rev=680364&r1=680363&r2=680364&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/create_seq_res_msg_processor.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/create_seq_res_msg_processor.c Mon Jul 28 07:05:13 2008
@@ -429,6 +429,7 @@
to_epr = axis2_endpoint_ref_create(env, to_addr);
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]to:%s", to_addr);
+ sandesha2_seq_property_bean_free(to_seq_bean, env);
}
else
{
@@ -479,6 +480,10 @@
sandesha2_next_msg_bean_set_ref_msg_key(next_bean, env, new_msg_store_key);
sandesha2_next_msg_bean_set_polling_mode(next_bean, env, polling_mode);
+ if(new_msg_store_key)
+ {
+ AXIS2_FREE(env->allocator, new_msg_store_key);
+ }
/* If polling_mode is true, starting the polling manager */
if(polling_mode)
@@ -492,11 +497,19 @@
SANDESHA2_SEQ_PROP_RM_SPEC_VERSION, rm_spec_ver);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, spec_ver_bean);
+ if(spec_ver_bean)
+ {
+ sandesha2_seq_property_bean_free(spec_ver_bean, env);
+ }
rcvd_msg_bean = sandesha2_seq_property_bean_create_with_data(env, rmd_sequence_id,
SANDESHA2_SEQ_PROP_SERVER_COMPLETED_MESSAGES, "");
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, rcvd_msg_bean);
+ if(rcvd_msg_bean)
+ {
+ sandesha2_seq_property_bean_free(rcvd_msg_bean, env);
+ }
msgs_bean = sandesha2_seq_property_bean_create_with_data(env, rmd_sequence_id,
SANDESHA2_SEQ_PROP_CLIENT_COMPLETED_MESSAGES, "");
Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_storage_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_storage_mgr.c?rev=680364&r1=680363&r2=680364&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_storage_mgr.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_storage_mgr.c Mon Jul 28 07:05:13 2008
@@ -774,9 +774,13 @@
sandesha2_msg_store_bean_set_flow(bean, env, axis2_msg_ctx_get_flow(msg_ctx, env));
sandesha2_msg_store_bean_set_svr_side(bean, env, axis2_msg_ctx_get_server_side(msg_ctx, env));
sandesha2_msg_store_bean_set_soap_envelope_str(bean, env, soap_str);
- if(xml_writer)
+ /*if(xml_writer)
{
axiom_xml_writer_free(xml_writer, env);
+ }*/
+ if(om_output)
+ {
+ axiom_output_free(om_output, env);
}
sandesha2_msg_store_bean_set_soap_version(bean, env, soap_version);
Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_creator.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_creator.c?rev=680364&r1=680363&r2=680364&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_creator.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_creator.c Mon Jul 28 07:05:13 2008
@@ -215,11 +215,13 @@
if (to_bean)
{
temp_value = sandesha2_seq_property_bean_get_value(to_bean, env);
- }
- if (temp_value)
- {
- to_epr = axis2_endpoint_ref_create(env, temp_value);
+ if (temp_value)
+ {
+ to_epr = axis2_endpoint_ref_create(env, temp_value);
+ }
+
+ sandesha2_seq_property_bean_free(to_bean, env);
}
anonymous_uri = sandesha2_spec_specific_consts_get_anon_uri(env, addressing_ns_value);
@@ -239,6 +241,8 @@
{
sandesha2_msg_ctx_set_reply_to(create_seq_rm_msg, env, reply_to_epr);
}
+
+ sandesha2_seq_property_bean_free(reply_to_bean, env);
}
temp_to = sandesha2_msg_ctx_get_to(create_seq_rm_msg, env);
@@ -246,6 +250,10 @@
{
sandesha2_msg_ctx_set_to(create_seq_rm_msg, env, to_epr);
}
+ else
+ {
+ axis2_endpoint_ref_free(to_epr, env);
+ }
temp_address = sandesha2_address_create(env, addressing_ns_value, acks_to_epr);
@@ -261,6 +269,21 @@
sandesha2_msg_ctx_add_soap_envelope(create_seq_rm_msg, env);
temp_action = sandesha2_spec_specific_consts_get_create_seq_action(env, rm_version);
+ if(acks_to_epr)
+ {
+ axis2_endpoint_ref_free(acks_to_epr, env);
+ }
+
+ if(temp_address)
+ {
+ sandesha2_address_free(temp_address, env);
+ }
+
+ if(temp_acks_to)
+ {
+ sandesha2_acks_to_free(temp_acks_to, env);
+ }
+
if(rm_version)
{
AXIS2_FREE(env->allocator, rm_version);
@@ -651,18 +674,18 @@
axis2_msg_ctx_t *related_msg,
axis2_msg_ctx_t *new_msg)
{
- axis2_op_t *old_op = NULL;
- axis2_op_ctx_t *old_op_ctx = NULL;
+ /*axis2_op_t *old_op = NULL;*/
+ /*axis2_op_ctx_t *old_op_ctx = NULL;*/
axis2_bool_t temp_bool = AXIS2_FALSE;
- axutil_hash_t *related_msg_props = NULL;
+ /*axutil_hash_t *related_msg_props = NULL;
axutil_hash_t *new_msg_props = NULL;
axis2_ctx_t *related_ctx = NULL;
- axis2_ctx_t *new_ctx = NULL;
+ axis2_ctx_t *new_ctx = NULL;*/
temp_bool = axis2_msg_ctx_get_server_side(related_msg, env);
axis2_msg_ctx_set_server_side(new_msg, env, temp_bool);
/* Adding all parameters from old message to the new one */
- old_op = axis2_msg_ctx_get_op(related_msg, env);
+ /*old_op = axis2_msg_ctx_get_op(related_msg, env);
if(old_op)
{
axutil_array_list_t *op_params = NULL;
@@ -692,9 +715,9 @@
axis2_op_add_param(new_op, env, new_param);
}
}
- }
+ }*/
/* Operation context properties */
- old_op_ctx = axis2_msg_ctx_get_op_ctx(related_msg, env);
+ /*old_op_ctx = axis2_msg_ctx_get_op_ctx(related_msg, env);
if(old_op_ctx)
{
axutil_hash_t *old_op_ctx_props = NULL;
@@ -734,9 +757,9 @@
}
}
}
- }
+ }*/
/* Setting options with properties copied from the old one */
- if(related_msg && new_msg)
+ /*if(related_msg && new_msg)
{
related_ctx = axis2_msg_ctx_get_base(related_msg, env);
related_msg_props = axis2_ctx_get_all_properties(related_ctx, env);
@@ -774,7 +797,7 @@
}
}
}
- }
+ }*/
return AXIS2_SUCCESS;
}
Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/sandesha2_utils.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/sandesha2_utils.c?rev=680364&r1=680363&r2=680364&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/sandesha2_utils.c Mon Jul 28 07:05:13 2008
@@ -509,7 +509,7 @@
const axutil_env_t *env,
sandesha2_msg_ctx_t *ref_rm_msg)
{
- axis2_ctx_t *ctx = NULL;
+ /*axis2_ctx_t *ctx = NULL;*/
axis2_msg_ctx_t *ref_msg = NULL;
axis2_msg_ctx_t *new_msg = NULL;
axis2_conf_ctx_t *conf_ctx = NULL;
@@ -552,7 +552,7 @@
axis2_msg_ctx_set_svc_ctx(new_msg, env, axis2_msg_ctx_get_svc_ctx(ref_msg, env));
axis2_msg_ctx_set_svc_grp_ctx(new_msg, env, axis2_msg_ctx_get_svc_grp_ctx(ref_msg, env));
- ctx = axis2_msg_ctx_get_base(ref_msg, env);
+ /*ctx = axis2_msg_ctx_get_base(ref_msg, env);
if (ctx)
{
axis2_ctx_t *new_ctx = axis2_msg_ctx_get_base(new_msg, env);
@@ -560,7 +560,7 @@
{
axis2_ctx_set_property_map(new_ctx, env, axis2_ctx_get_property_map(ctx, env));
}
- }
+ }*/
soap_env = axiom_soap_envelope_create_default_soap_envelope(env,
sandesha2_utils_get_soap_version(env, axis2_msg_ctx_get_soap_envelope(ref_msg, env)));
@@ -587,16 +587,16 @@
property = axis2_msg_ctx_get_property(req_msg, env, AXIS2_WSA_VERSION);
if(property)
{
- addr_ver = axutil_property_get_value(property, env);
+ addr_ver = axutil_strdup(env, axutil_property_get_value(property, env));
}
}
}
else
{
- addr_ver = axutil_property_get_value(property, env);
+ addr_ver = axutil_strdup(env, axutil_property_get_value(property, env));
}
- property = axutil_property_create_with_args(env, 0, 0, 0, addr_ver);
+ property = axutil_property_create_with_args(env, 0, AXIS2_TRUE, 0, addr_ver);
axis2_msg_ctx_set_property(new_msg, env, AXIS2_WSA_VERSION, property);
out_stream = axis2_msg_ctx_get_transport_out_stream(ref_msg, env);
@@ -1136,19 +1136,33 @@
const axutil_env_t *env,
const axis2_char_t *address)
{
+ axis2_bool_t ret = AXIS2_FALSE;
+
axis2_char_t *address_l = NULL;
if(!address)
+ {
return AXIS2_TRUE;
+ }
+
address_l = axutil_strtrim(env, address, NULL);
- if(0 == axutil_strcmp(AXIS2_WSA_ANONYMOUS_URL, address_l))
- return AXIS2_TRUE;
- if(0 == axutil_strcmp(AXIS2_WSA_ANONYMOUS_URL_SUBMISSION, address_l))
- return AXIS2_TRUE;
+ if(!axutil_strcmp(AXIS2_WSA_ANONYMOUS_URL, address_l))
+ {
+ ret = AXIS2_TRUE;
+ }
+
+ if(!axutil_strcmp(AXIS2_WSA_ANONYMOUS_URL_SUBMISSION, address_l))
+ {
+ ret = AXIS2_TRUE;
+ }
else if (sandesha2_utils_is_wsrm_anon_reply_to(env, (axis2_char_t *) address))
- return AXIS2_TRUE;
+ {
+ ret = AXIS2_TRUE;
+ }
- return AXIS2_FALSE;
+ AXIS2_FREE(env->allocator, address_l);
+
+ return ret;
}
axutil_array_list_t *AXIS2_CALL
Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c?rev=680364&r1=680363&r2=680364&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c Mon Jul 28 07:05:13 2008
@@ -250,38 +250,50 @@
sandesha2_next_msg_bean_set_seq_id(find_bean, env, seq_id);
found_list = sandesha2_next_msg_mgr_find(next_msg_mgr, env, find_bean);
+ sandesha2_next_msg_bean_free(find_bean, env);
if(found_list)
- size = axutil_array_list_size(found_list, env);
- for(i = 0; i < size; i++)
{
- sandesha2_next_msg_bean_t *bean = axutil_array_list_get(found_list,
- env, i);
- if(bean)
+ size = axutil_array_list_size(found_list, env);
+
+ for(i = 0; i < size; i++)
{
- axis2_char_t *key = NULL;
- axis2_char_t *seq_id = NULL;
- key = sandesha2_next_msg_bean_get_ref_msg_key(bean, env);
- if(key)
+ sandesha2_next_msg_bean_t *bean = axutil_array_list_get(found_list, env, i);
+ if(bean)
{
- sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env, key,
- conf_ctx, -1);
+ axis2_char_t *key = NULL;
+ axis2_char_t *seq_id = NULL;
+
+ key = sandesha2_next_msg_bean_get_ref_msg_key(bean, env);
+ if(key)
+ {
+ sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env, key, conf_ctx, -1);
+ }
+
+ seq_id = sandesha2_next_msg_bean_get_seq_id(bean, env);
+ if(seq_id)
+ {
+ sandesha2_next_msg_mgr_remove(next_msg_mgr, env, seq_id);
+ }
}
- seq_id = sandesha2_next_msg_bean_get_seq_id(bean, env);
- if(seq_id)
- sandesha2_next_msg_mgr_remove(next_msg_mgr, env, seq_id);
}
+
+ axutil_array_list_free(found_list, env);
}
+
highest_in_msg_key = sandesha2_utils_get_seq_property(env, seq_id,
SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_KEY, seq_prop_mgr);
if(highest_in_msg_key)
{
- sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env,
- highest_in_msg_key, conf_ctx, -1);
+ sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env, highest_in_msg_key, conf_ctx, -1);
if(highest_in_msg_key)
+ {
AXIS2_FREE(env->allocator, highest_in_msg_key);
+ }
}
- sandesha2_terminate_mgr_remove_recv_side_properties(env, conf_ctx, seq_id,
- storage_mgr, seq_prop_mgr);
+
+ sandesha2_terminate_mgr_remove_recv_side_properties(env, conf_ctx, seq_id, storage_mgr,
+ seq_prop_mgr);
+
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
"[sandesha2]Exit:sandesha2_terminate_mgr_complete_termination_of_recv_side");
return AXIS2_SUCCESS;
@@ -340,8 +352,8 @@
}
find_seq_prop_bean = sandesha2_seq_property_bean_create(env);
sandesha2_seq_property_bean_set_seq_id(find_seq_prop_bean, env, seq_id);
- found_list = sandesha2_seq_property_mgr_find(seq_prop_mgr, env,
- find_seq_prop_bean);
+ found_list = sandesha2_seq_property_mgr_find(seq_prop_mgr, env, find_seq_prop_bean);
+ sandesha2_seq_property_bean_free(find_seq_prop_bean, env);
if(found_list)
{
int i = 0, size = 0;
@@ -357,29 +369,33 @@
sandesha2_seq_property_bean_get_name(seq_prop_bean, env)))
{
axis2_char_t *highest_in_msg_key_str = NULL;
- axis2_char_t *seq_id = sandesha2_seq_property_bean_get_seq_id(
- seq_prop_bean, env);
- axis2_char_t *name = sandesha2_seq_property_bean_get_name(
- seq_prop_bean, env);
+ axis2_char_t *seq_id = sandesha2_seq_property_bean_get_seq_id(seq_prop_bean, env);
+ axis2_char_t *name = sandesha2_seq_property_bean_get_name(seq_prop_bean, env);
+
if(!axutil_strcmp(name, SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_NUMBER))
{
highest_in_msg_key_str =
sandesha2_seq_property_bean_get_value(seq_prop_bean, env);
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] "\
- "Removing the message context for the highest in "\
- "message number");
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "[sandesha2] Removing the message context for the highest in message number");
sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env,
highest_in_msg_key_str, conf_ctx, -1);
}
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Removing "\
- "the sequence property named %s in the sequence %s", name,
- seq_id);
+
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "[sandesha2] Removing the sequence property named %s in the sequence %s",
+ name, seq_id);
+
sandesha2_seq_property_mgr_remove(seq_prop_mgr, env, seq_id, name);
}
}
+
+ axutil_array_list_free(found_list, env);
}
+
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
- "[sandesha2]Exit:sandesha2_terminate_mgr_remove_recv_side_properties");
+ "[sandesha2]Exit:sandesha2_terminate_mgr_remove_recv_side_properties");
+
return AXIS2_SUCCESS;
}
@@ -920,8 +936,8 @@
sandesha2_msg_ctx_free(terminate_rm_msg_ctx, env);
}
- /* We have created this message context using sandesha2_utils_create_new_related_msg_ctx(). It is out
- * reponsiblity to free if after use.
+ /* We have created this message context using sandesha2_utils_create_new_related_msg_ctx(). It is our
+ * reponsiblity to free it after use.
*/
if(terminate_msg_ctx)
{
Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/wsrm/seq_ack.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/wsrm/seq_ack.c?rev=680364&r1=680363&r2=680364&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/wsrm/seq_ack.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/wsrm/seq_ack.c Mon Jul 28 07:05:13 2008
@@ -343,6 +343,12 @@
sa_block = axiom_soap_header_add_header_block(soap_header, env, SANDESHA2_WSRM_COMMON_SEQ_ACK,
rm_ns);
+
+ if (rm_ns)
+ {
+ axiom_namespace_free(rm_ns, env);
+ rm_ns = NULL;
+ }
if(!sa_block)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org