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 sa...@apache.org on 2006/04/04 09:03:30 UTC

svn commit: r391234 - in /webservices/axis2/trunk/c/modules/core/clientapi: call.c listener_manager.c

Author: samisa
Date: Tue Apr  4 00:03:28 2006
New Revision: 391234

URL: http://svn.apache.org/viewcvs?rev=391234&view=rev
Log:
Fixed to use the axis2_init_thread_env function

Modified:
    webservices/axis2/trunk/c/modules/core/clientapi/call.c
    webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c

Modified: webservices/axis2/trunk/c/modules/core/clientapi/call.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/call.c?rev=391234&r1=391233&r2=391234&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/call.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/call.c Tue Apr  4 00:03:28 2006
@@ -875,24 +875,28 @@
     axis2_call_worker_func_args_t *args_list = NULL;
     axis2_op_ctx_t *op_ctx = NULL;
     axis2_msg_ctx_t *response = NULL;
+	axis2_env_t **thread_env = NULL;
+	axis2_env_t *th_env = NULL;
     
     args_list = (axis2_call_worker_func_args_t *) data;
     if (!args_list)
         return NULL;
         
     AXIS2_ENV_CHECK(args_list->env, AXIS2_FAILURE);
+	th_env = axis2_init_thread_env(args_list->env);
+    thread_env = &th_env;
 
-    op_ctx = axis2_op_ctx_create(args_list->env, args_list->op, args_list->call_impl->svc_ctx);
+    op_ctx = axis2_op_ctx_create(thread_env, args_list->op, args_list->call_impl->svc_ctx);
     if (!op_ctx)
         return NULL;
-    AXIS2_MSG_CTX_SET_OP_CTX(args_list->msg_ctx, args_list->env, op_ctx);
-    AXIS2_MSG_CTX_SET_SVC_CTX(args_list->msg_ctx, args_list->env, args_list->call_impl->svc_ctx);
+    AXIS2_MSG_CTX_SET_OP_CTX(args_list->msg_ctx, thread_env, op_ctx);
+    AXIS2_MSG_CTX_SET_SVC_CTX(args_list->msg_ctx, thread_env, args_list->call_impl->svc_ctx);
 
     /* send the request and wait for reponse */
-    response = axis2_two_way_send(args_list->env, args_list->msg_ctx);
-    args_list->call_impl->async_result = axis2_async_result_create(args_list->env, response);
-    AXIS2_CALLBACK_INVOKE_ON_COMPLETE(args_list->callback, args_list->env, args_list->call_impl->async_result);
-    AXIS2_CALLBACK_SET_COMPLETE(args_list->callback, args_list->env, AXIS2_TRUE);
+    response = axis2_two_way_send(thread_env, args_list->msg_ctx);
+    args_list->call_impl->async_result = axis2_async_result_create(thread_env, response);
+    AXIS2_CALLBACK_INVOKE_ON_COMPLETE(args_list->callback, thread_env, args_list->call_impl->async_result);
+    AXIS2_CALLBACK_SET_COMPLETE(args_list->callback, thread_env, AXIS2_TRUE);
     
     return NULL; 
 }

Modified: webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c?rev=391234&r1=391233&r2=391234&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c Tue Apr  4 00:03:28 2006
@@ -345,15 +345,19 @@
 axis2_listener_manager_worker_func(axis2_thread_t *thd, void *data)
 {
     axis2_listener_manager_worker_func_args_t *args_list = NULL;
+	axis2_env_t **thread_env = NULL;
+	axis2_env_t *th_env = NULL;
     
     args_list = (axis2_listener_manager_worker_func_args_t *) data;
     if (!args_list)
        return NULL;    
 
     AXIS2_ENV_CHECK(args_list->env, AXIS2_FAILURE);
+	th_env = axis2_init_thread_env(args_list->env);
+    thread_env = &th_env;
     if (args_list->listener)
     {
-        AXIS2_TRANSPORT_RECEIVER_START(args_list->listener, args_list->env);
+        AXIS2_TRANSPORT_RECEIVER_START(args_list->listener, thread_env);
     }
     return NULL;
 }