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 2009/06/18 06:58:20 UTC

svn commit: r785903 - in /webservices/sandesha/trunk/c/src: msgprocessors/app_msg_processor.c storage/sqlite/permanent_seq_property_mgr.c

Author: damitha
Date: Thu Jun 18 04:58:19 2009
New Revision: 785903

URL: http://svn.apache.org/viewvc?rev=785903&view=rev
Log:

Fixing some segfault that happen with apache2 when running two way dual channel messages

Modified:
    webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.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=785903&r1=785902&r2=785903&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Thu Jun 18 04:58:19 2009
@@ -2472,13 +2472,15 @@
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
             "[sandesha2] Entry:sandesha2_app_msg_processor_start_create_seq_msg_resender");
     
+    axutil_allocator_switch_to_global_pool(env->allocator);
     args = AXIS2_MALLOC(env->allocator, sizeof(sandesha2_app_msg_processor_args_t));
     args->env = axutil_init_thread_env(env);
     args->conf_ctx = conf_ctx;
-    args->internal_sequence_id = internal_sequence_id;
-    args->msg_id = msg_id;
+    args->internal_sequence_id = axutil_strdup(env, internal_sequence_id);
+    args->msg_id = axutil_strdup(env, msg_id);
     args->retrans_interval = retrans_interval;
     args->is_server_side = is_server_side;
+    axutil_allocator_switch_to_local_pool(env->allocator);
 
     worker_thread = axutil_thread_pool_get_thread(env->thread_pool, 
             sandesha2_app_msg_processor_create_seq_msg_worker_function, (void*)args);
@@ -2531,7 +2533,7 @@
 
     conf_ctx = args->conf_ctx;
     msg_id = args->msg_id;
-    internal_sequence_id = axutil_strdup(env, args->internal_sequence_id);
+    internal_sequence_id = args->internal_sequence_id;
     is_server_side = args->is_server_side;
     retrans_interval = args->retrans_interval;
 
@@ -3467,15 +3469,17 @@
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
             "[sandesha2] Entry:sandesha2_app_msg_processor_start_application_msg_resender");
     
+    axutil_allocator_switch_to_global_pool(env->allocator);
     args = AXIS2_MALLOC(env->allocator, sizeof(sandesha2_app_msg_processor_args_t));
     args->env = axutil_init_thread_env(env);
     args->conf_ctx = conf_ctx;
     args->internal_sequence_id = axutil_strdup(env, internal_sequence_id);
-    args->msg_id = msg_id;
+    args->msg_id = axutil_strdup(env, msg_id);
     args->retrans_interval = retrans_interval;
     args->is_server_side = is_server_side;
     args->msg_ctx = app_msg_ctx;
     args->sequence = sequence;
+    axutil_allocator_switch_to_local_pool(env->allocator);
 
     worker_thread = axutil_thread_pool_get_thread(env->thread_pool, 
             sandesha2_app_msg_processor_application_msg_worker_function, (void*)args);
@@ -3532,8 +3536,8 @@
         "[sandesha2] Entry:sandesha2_app_msg_processor_application_msg_worker_function");
     conf_ctx = args->conf_ctx;
     sequence = args->sequence;
-    msg_id = axutil_strdup(env, args->msg_id);
-    internal_sequence_id = axutil_strdup(env, args->internal_sequence_id);
+    msg_id = args->msg_id;
+    internal_sequence_id = args->internal_sequence_id;
     is_server_side = args->is_server_side;
     retrans_interval = args->retrans_interval;
     dbname = sandesha2_util_get_dbname(env, conf_ctx);

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.c?rev=785903&r1=785902&r2=785903&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.c Thu Jun 18 04:58:19 2009
@@ -87,9 +87,16 @@
     char **col_name)
 {
     int i = 0;
-    sandesha2_bean_mgr_args_t *args = (sandesha2_bean_mgr_args_t *) not_used;
-    const axutil_env_t *env = args->env;
+    sandesha2_bean_mgr_args_t *args = NULL;
+    const axutil_env_t *env = NULL;
     sandesha2_seq_property_bean_t *bean = NULL;
+
+    args = (sandesha2_bean_mgr_args_t *) not_used;
+    if(args)
+    {
+        args->data = NULL;
+    } 
+    env = args->env;
     if(argc < 1)
     {
         args->data = NULL;



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org