Author: damitha
Date: Wed Sep  3 09:03:11 2008
New Revision: 691645

URL: http://svn.apache.org/viewvc?rev=691645&view=rev
Log:
Fixing the segfault in php/Sandesha2 server side in windows

Modified:
    webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_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=691645&r1=691644&r2=691645&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c 
(original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Wed Sep  
3 09:03:11 2008
@@ -570,21 +570,20 @@
         
         highest_in_msg_no = msg_no;
         msg_id = axis2_msg_ctx_get_msg_id(app_msg_ctx, env);
-        highest_msg_no_bean = 
sandesha2_seq_property_bean_create_with_data(env, 
-            rmd_sequence_id, SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_NUMBER, 
-                msg_num_str);
-        highest_msg_key_bean = 
sandesha2_seq_property_bean_create_with_data(env, 
-            rmd_sequence_id, SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_KEY, 
-                highest_in_msg_key_str);
-        highest_msg_id_bean = 
sandesha2_seq_property_bean_create_with_data(env, 
-            rmd_sequence_id, SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_ID, 
-                (axis2_char_t *)msg_id);
-        sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env, 
+        highest_msg_no_bean = 
sandesha2_seq_property_bean_create_with_data(env, rmd_sequence_id, 
+                SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_NUMBER, msg_num_str);
+
+        highest_msg_key_bean = 
sandesha2_seq_property_bean_create_with_data(env, rmd_sequence_id, 
+                SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_KEY, highest_in_msg_key_str);
+
+        highest_msg_id_bean = 
sandesha2_seq_property_bean_create_with_data(env, rmd_sequence_id, 
+                SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_ID, (axis2_char_t *)msg_id);
+
+        /*sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env, 
             highest_in_msg_key_str, conf_ctx, -1);
         sandesha2_storage_mgr_store_msg_ctx(storage_mgr, env, 
highest_in_msg_key_str, app_msg_ctx, 
-                AXIS2_TRUE);
+                AXIS2_TRUE);*/
 
-        /*response_envelope = axis2_msg_ctx_get_soap_envelope(app_msg_ctx, 
env);*/
         property = axis2_msg_ctx_get_property(app_msg_ctx, env, 
SANDESHA2_CLIENT_SEQ_KEY);
         if(property)
         {
@@ -1589,26 +1588,6 @@
             send_create_seq = AXIS2_TRUE;
         }
 
-        /*if(!is_svr_side)
-        {
-            axutil_property_t *property = NULL;
-            axis2_ctx_t *ctx = axis2_conf_ctx_get_base(conf_ctx, env);
-            axutil_hash_t *msg_ctx_map = NULL;
-
-            property = axis2_ctx_get_property(ctx, env, SANDESHA2_MSG_CTX_MAP);
-            if(!property)
-            {
-                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-                        "[sandesha2]msg_ctx_map not found in the conf_ctx");
-
-                msg_ctx_map = axutil_hash_make(env);
-                property = axutil_property_create_with_args(env, 
AXIS2_SCOPE_APPLICATION, AXIS2_TRUE, 
-                        axutil_hash_free_void_arg, msg_ctx_map);
-
-                axis2_ctx_set_property(ctx, env, SANDESHA2_MSG_CTX_MAP, 
property);
-            }
-        }*/
-
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
                 "Starting the rms sequence with rms rms internal sequence id 
%s", 
                 internal_sequence_id);

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=691645&r1=691644&r2=691645&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 
Sep  3 09:03:11 2008
@@ -267,29 +267,16 @@
     axis2_msg_ctx_t *msg_ctx,
     axis2_bool_t store_in_memory)
 {
-    axis2_conf_ctx_t *conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
-    axutil_property_t *property = NULL;
-    axis2_ctx_t *ctx = axis2_conf_ctx_get_base(conf_ctx, env);
     sandesha2_msg_store_bean_t *msg_store_bean = NULL;
     sandesha2_permanent_storage_mgr_t *storage_mgr_impl = NULL;
     storage_mgr_impl = SANDESHA2_INTF_TO_IMPL(storage_mgr);
     
-    property = axis2_ctx_get_property(ctx, env, SANDESHA2_MSG_CTX_MAP);
-    /*axis2_msg_ctx_set_keep_alive(msg_ctx, env, AXIS2_TRUE);*/
     msg_store_bean = sandesha2_permanent_storage_mgr_get_msg_store_bean(
         storage_mgr, env, msg_ctx);
     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(property && store_in_memory)
-    {
-        axutil_hash_t *msg_ctx_map = NULL;
-        msg_ctx_map = axutil_property_get_value(property, env);
-        axutil_hash_set(msg_ctx_map, axutil_strdup(env, key),
-            AXIS2_HASH_KEY_STRING, msg_ctx);
-    }*/
-
     if(msg_store_bean)
     {
         sandesha2_msg_store_bean_free(msg_store_bean, env);
@@ -308,24 +295,7 @@
     sandesha2_msg_store_bean_t *msg_store_bean = NULL;
     sandesha2_permanent_storage_mgr_t *storage_mgr_impl = NULL;
     storage_mgr_impl = SANDESHA2_INTF_TO_IMPL(storage_mgr);
-    {
-        axis2_conf_ctx_t *conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
-        axutil_property_t *property = NULL;
-        axis2_ctx_t *ctx = axis2_conf_ctx_get_base(conf_ctx, env);
-        axutil_hash_t *msg_ctx_map = NULL;
-
-        property = axis2_ctx_get_property(ctx, env, SANDESHA2_MSG_CTX_MAP);
-        if(property)
-        {
-            msg_ctx_map = axutil_property_get_value(property, env);
-            if(msg_ctx_map)
-            {
-                axutil_hash_set(msg_ctx_map, axutil_strdup(env, key), 
AXIS2_HASH_KEY_STRING, msg_ctx);
-            }
-        }
-    }
 
-    /*axis2_msg_ctx_set_keep_alive(msg_ctx, env, AXIS2_TRUE);*/
     msg_store_bean = 
sandesha2_permanent_storage_mgr_get_msg_store_bean(storage_mgr, env, msg_ctx);
     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, 
@@ -348,39 +318,8 @@
     int msg_type)
 {
     sandesha2_permanent_storage_mgr_t *storage_mgr_impl = NULL;
-    axutil_property_t *property = NULL;
-    axis2_ctx_t *ctx = axis2_conf_ctx_get_base(conf_ctx, env);
-    axutil_hash_t *msg_ctx_map = NULL;
     storage_mgr_impl = SANDESHA2_INTF_TO_IMPL(storage_mgr);
 
-    property = axis2_ctx_get_property(ctx, env, SANDESHA2_MSG_CTX_MAP);
-    if(property)
-    {
-        msg_ctx_map = axutil_property_get_value(property, env);
-        if(msg_ctx_map)
-        {
-            axutil_hash_index_t *i = NULL;
-
-            for (i = axutil_hash_first(msg_ctx_map, env); i; i = 
axutil_hash_next(env, i))
-            {
-                const void *k = NULL;
-                void *v = NULL;
-                axis2_char_t *key_l = NULL;
-
-                axutil_hash_this(i, &k, NULL, &v);
-                key_l = (axis2_char_t *) k;
-                if(!axutil_strcmp(key, key_l))
-                {
-                    if(msg_type == SANDESHA2_MSG_TYPE_APPLICATION)
-                    {
-                        axutil_hash_set(msg_ctx_map, key, 
AXIS2_HASH_KEY_STRING, NULL);
-                        AXIS2_FREE(env->allocator, key_l);
-                    }
-                }
-            }
-        }
-    }
-
     
sandesha2_permanent_bean_mgr_remove_msg_store_bean(storage_mgr_impl->bean_mgr, 
env, key);
 
     return AXIS2_SUCCESS;



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to