You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2008/06/19 15:50:52 UTC

svn commit: r669486 - in /webservices/axis2/trunk/c/src/core: engine/engine.c receivers/msg_recv.c transport/http/common/http_worker.c

Author: damitha
Date: Thu Jun 19 06:50:52 2008
New Revision: 669486

URL: http://svn.apache.org/viewvc?rev=669486&view=rev
Log:
Adding useful code comments

Modified:
    webservices/axis2/trunk/c/src/core/engine/engine.c
    webservices/axis2/trunk/c/src/core/receivers/msg_recv.c
    webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c

Modified: webservices/axis2/trunk/c/src/core/engine/engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/engine.c?rev=669486&r1=669485&r2=669486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/engine.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/engine.c Thu Jun 19 06:50:52 2008
@@ -225,6 +225,7 @@
                                               pre_calculated_phases, msg_ctx);
         if (axis2_msg_ctx_is_paused(msg_ctx, env))
         {
+            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Message context is paused. So return here.");
             return AXIS2_SUCCESS;
         }
 
@@ -238,6 +239,7 @@
                                                   op_specific_phases, msg_ctx);
             if (axis2_msg_ctx_is_paused(msg_ctx, env))
             {
+                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Message context is paused. So return here.");
                 return AXIS2_SUCCESS;
             }
         }
@@ -258,6 +260,7 @@
 
         if (axis2_msg_ctx_is_paused(msg_ctx, env))
         {
+            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Message context is paused. So return here.");
             return AXIS2_SUCCESS;
         }
 
@@ -274,13 +277,13 @@
                 op_name = axutil_qname_get_localpart(axis2_op_get_qname(op, env), 
                     env);
                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                    "Invoking operation specific phases failed for "\
-                    "operation %s", op_name);
+                    "Invoking operation specific phases failed for operation %s", op_name);
                 return status;
             }
 
             if (axis2_msg_ctx_is_paused(msg_ctx, env))
             {
+                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Message context is paused. So return here.");
                 return AXIS2_SUCCESS;
             }
         }

Modified: webservices/axis2/trunk/c/src/core/receivers/msg_recv.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/receivers/msg_recv.c?rev=669486&r1=669485&r2=669486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/receivers/msg_recv.c (original)
+++ webservices/axis2/trunk/c/src/core/receivers/msg_recv.c Thu Jun 19 06:50:52 2008
@@ -362,6 +362,11 @@
         }
     }
     axis2_engine_free(engine, env);
+
+    /* Reset the out message context to avoid double freeing at http worker. For example if this is
+     * not done here both in and out message context will try to free the transport out stream 
+     * which will result in memeory corruption.
+     */
     if (!axis2_msg_ctx_is_paused(out_msg_ctx, env) &&
         !axis2_msg_ctx_is_keep_alive(out_msg_ctx, env))
     {

Modified: webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c?rev=669486&r1=669485&r2=669486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c Thu Jun 19 06:50:52 2008
@@ -170,8 +170,7 @@
     conf_ctx = http_worker->conf_ctx;
     if (!conf_ctx)
     {
-        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_NULL_CONFIGURATION_CONTEXT,
-                           AXIS2_FAILURE);
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_NULL_CONFIGURATION_CONTEXT, AXIS2_FAILURE);
         return AXIS2_FALSE;
     }