axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r368971 - in /webservices/axis2/trunk/c: include/axis2_error.h modules/core/deployment/dep_engine.c modules/core/deployment/ws_info_list.c test/core/deployment/test_deployment.c
Date Sat, 14 Jan 2006 04:49:16 GMT
Author: samisa
Date: Fri Jan 13 20:49:06 2006
New Revision: 368971

URL: http://svn.apache.org/viewcvs?rev=368971&view=rev
Log:
Added AXIS2_ERROR_LAST and also fixed few more bugs

Modified:
    webservices/axis2/trunk/c/include/axis2_error.h
    webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
    webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c
    webservices/axis2/trunk/c/test/core/deployment/test_deployment.c

Modified: webservices/axis2/trunk/c/include/axis2_error.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_error.h?rev=368971&r1=368970&r2=368971&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_error.h (original)
+++ webservices/axis2/trunk/c/include/axis2_error.h Fri Jan 13 20:49:06 2006
@@ -119,7 +119,15 @@
     */
     enum axis2_error_codes
     {
-        /** No error */
+        /** No error. 
+            This must be the first error all the time and the assigned value of 0 
+            must not be changed as it is assumed in the error message array that 
+            the error list starts with a value of 0.
+            Further, none of the error codes in this enum should not be initialized 
+            to an arbitrary value as it is assumed in the implementation when mapping 
+            error codes to error messages that the error codes are contiguous and 
+            the last error value is always AXIS2_ERROR_LAST.
+          */
         AXIS2_ERROR_NONE = 0,
         /** Out of memory */
         AXIS2_ERROR_NO_MEMORY,
@@ -383,7 +391,7 @@
         AXIS2_ERROR_INVALID_SOAP_NAMESPACE_URI,
         
         AXIS2_ERROR_SOAP_MESSAGE_DOES_NOT_CONTAIN_AN_ENVELOPE,
-        
+       
         AXIS2_ERROR_TRANSPORT_LEVEL_INFORMATION_DOES_NOT_MATCH_WITH_SOAP,
         
         /* Error in writing the response in response writer */
@@ -410,7 +418,14 @@
         /* OM output is NULL */
         AXIS2_ERROR_NULL_OM_OUTPUT,
         /* We got a NULL strem in the response body */
-        AXIS2_ERROR_NULL_STREAM_IN_RESPONSE_BODY
+        AXIS2_ERROR_NULL_STREAM_IN_RESPONSE_BODY,
+
+        /** The following has to be the last error value all the time.
+            All other error codes should appear above this.
+            AXIS2_ERROR_LAST is used to track the number of error codes present
+            for the purpose of sizing the error message array.
+          */
+       AXIS2_ERROR_LAST
     };
 
 /** @} */

Modified: webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c?rev=368971&r1=368970&r2=368971&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c Fri Jan 13 20:49:06 2006
@@ -296,6 +296,14 @@
     engine_impl->ws_to_deploy = axis2_array_list_create(env, 10);
     if (!(engine_impl->ws_to_deploy))
     {
+        axis2_dep_engine_free(&(engine_impl->dep_engine), env);
+        return NULL;
+    }
+    
+    engine_impl->phases_info = axis2_phases_info_create(env);
+    if (!(engine_impl->phases_info))
+    {
+        axis2_dep_engine_free(&(engine_impl->dep_engine), env);
         return NULL;
     }
     
@@ -877,6 +885,9 @@
     engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
     
     in_phases = AXIS2_PHASES_INFO_GET_IN_PHASES(engine_impl->phases_info, env);
+
+    if (!in_phases)
+        return AXIS2_FAILURE;
     
     /* TODO condition checking should be otherway since null value can occur */
     phase0 = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(in_phases, env, 0);

Modified: webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c?rev=368971&r1=368970&r2=368971&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c Fri Jan 13 20:49:06 2006
@@ -363,6 +363,11 @@
     
     AXIS2_FUNC_PARAM_CHECK(info_list, env, AXIS2_FAILURE);
     info_list_impl = AXIS2_INTF_TO_IMPL(info_list);
+
+    /* create temp list*/
+    temp_list = axis2_array_list_create(env, 5);
+    if (!temp_list)
+        return AXIS2_FAILURE;
     
     for(i = 0; i < list_size; i++)
     {

Modified: webservices/axis2/trunk/c/test/core/deployment/test_deployment.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/deployment/test_deployment.c?rev=368971&r1=368970&r2=368971&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/deployment/test_deployment.c (original)
+++ webservices/axis2/trunk/c/test/core/deployment/test_deployment.c Fri Jan 13 20:49:06 2006
@@ -27,6 +27,11 @@
     }
     printf("came1\n");
     conf = AXIS2_DEP_ENGINE_LOAD(dep_engine, &env);
+    if (!conf)
+    {
+        printf("conf is NULL\n)");
+        return -1;
+    }
     printf("came2\n");
     in_phases = 
         AXIS2_CONF_GET_IN_PHASES_UPTO_AND_INCLUDING_POST_DISPATCH(



Mime
View raw message