You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2006/01/16 08:41:11 UTC

svn commit: r369382 - in /webservices/axis2/trunk/c: include/axis2_error.h modules/core/deployment/dep_engine.c test/core/deployment/test_deployment.c

Author: damitha
Date: Sun Jan 15 23:40:57 2006
New Revision: 369382

URL: http://svn.apache.org/viewcvs?rev=369382&view=rev
Log:
Fixed an logic error in axis2_dep_engine_validate_system_predefined_phases

Modified:
    webservices/axis2/trunk/c/include/axis2_error.h
    webservices/axis2/trunk/c/modules/core/deployment/dep_engine.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=369382&r1=369381&r2=369382&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_error.h (original)
+++ webservices/axis2/trunk/c/include/axis2_error.h Sun Jan 15 23:40:57 2006
@@ -365,7 +365,7 @@
         AXIS2_ERROR_CONFIG_NOT_FOUND,
         AXIS2_PATH_TO_CONFIG_CAN_NOT_BE_NULL,
         AXIS2_ERROR_MODULE_VAL_FAILED,
-        AXI2_ERROR_IN_VALID_PHASE,
+        AXI2_ERROR_INVALID_PHASE,
         AXIS2_ERROR_INVALID_MODUELE_REF,
         AXIS2_ERROR_INVALID_MODUELE_REF_BY_OP,
         AXIS2_ERROR_INVALID_SVC,

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=369382&r1=369381&r2=369382&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c Sun Jan 15 23:40:57 2006
@@ -695,8 +695,11 @@
         engine_impl->conf = NULL;
         return NULL;
     }
-    axis2_dep_engine_set_dep_features(dep_engine, env);
-    
+    status = axis2_dep_engine_set_dep_features(dep_engine, env);
+    if(AXIS2_SUCCESS != status)
+    {
+        return NULL;
+    }
     /*
     if (hotDeployment) {
         startSearch(this);
@@ -713,6 +716,7 @@
     }
     AXIS2_CONF_SET_REPOS(engine_impl->conf, env, engine_impl->axis2_repos);
     status = axis2_dep_engine_validate_system_predefined_phases(dep_engine, env);
+    printf("status:%d\n", status);
     if(AXIS2_FAILURE == status)
     {
         AXIS2_REPOS_LISTENER_FREE(repos_listener, env);
@@ -909,21 +913,21 @@
     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);
     phase1 = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(in_phases, env, 1);
     phase2 = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(in_phases, env, 2);
     phase3 = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(in_phases, env, 3);
-    if(0 == AXIS2_STRCMP(phase0, AXIS2_PHASE_TRANSPORTIN) && 
-        0 == AXIS2_STRCMP(phase1, AXIS2_PHASE_PRE_DISPATCH) &&
-        0 == AXIS2_STRCMP(phase2, AXIS2_PHASE_DISPATCH) && 
-        0 == AXIS2_STRCMP(phase3, AXIS2_PHASE_POST_DISPATCH))
+    if(0 != AXIS2_STRCMP(phase0, AXIS2_PHASE_TRANSPORTIN) || 
+        0 != AXIS2_STRCMP(phase1, AXIS2_PHASE_PRE_DISPATCH) ||
+        0 != AXIS2_STRCMP(phase2, AXIS2_PHASE_DISPATCH) ||
+        0 != AXIS2_STRCMP(phase3, AXIS2_PHASE_POST_DISPATCH))
     {
-        AXIS2_ERROR_SET((*env)->error, AXI2_ERROR_IN_VALID_PHASE, AXIS2_FAILURE);
+        AXIS2_ERROR_SET((*env)->error, AXI2_ERROR_INVALID_PHASE, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
     /*  ArrayList outPhaes = tempdata.getOutphases(); */

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=369382&r1=369381&r2=369382&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/deployment/test_deployment.c (original)
+++ webservices/axis2/trunk/c/test/core/deployment/test_deployment.c Sun Jan 15 23:40:57 2006
@@ -86,7 +86,7 @@
 
 int main()
 {
-    axis2_test_dep_engine_load();
     axis2_test_engine_conf_builder_populate_conf();
+    axis2_test_dep_engine_load();
 	return 0;
 }