Author: samisa
Date: Tue Apr 4 22:40:26 2006
New Revision: 391526
URL: http://svn.apache.org/viewcvs?rev=391526&view=rev
Log:
More fixes to get the client side listner manager working.
There was a problem with double free and now it is solved
Modified:
webservices/axis2/trunk/c/modules/core/clientapi/call.c
webservices/axis2/trunk/c/modules/core/clientapi/callback_recv.c
webservices/axis2/trunk/c/modules/core/context/msg_ctx.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=391526&r1=391525&r2=391526&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/call.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/call.c Tue Apr 4 22:40:26 2006
@@ -202,7 +202,7 @@
call_impl->call.ops = NULL;
call_impl->base = NULL;
- call_impl->timeout_ms = 2000;
+ call_impl->timeout_ms = 60000;
call_impl->transport_listener = NULL;
call_impl->sender_transport = NULL;
call_impl->listener_transport = NULL;
@@ -440,13 +440,13 @@
if (status != AXIS2_SUCCESS)
return NULL;
- index = call_impl->timeout_ms / 1000;
+ index = call_impl->timeout_ms / 100;
while (!(AXIS2_CALLBACK_GET_COMPLETE(callback, env)))
{
/*wait till the reponse arrives*/
if (index-- >= 0)
{
- /* TODO AXIS2_THREAD_SLEEP(env, 1); */
+ AXIS2_USLEEP(100);
}
else
{
Modified: webservices/axis2/trunk/c/modules/core/clientapi/callback_recv.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/callback_recv.c?rev=391526&r1=391525&r2=391526&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/callback_recv.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/callback_recv.c Tue Apr 4 22:40:26 2006
@@ -150,6 +150,16 @@
if (callback_recv_impl->callback_map)
{
+ axis2_hash_index_t *hi = NULL;
+ void *val = NULL;
+ for (hi = axis2_hash_first (callback_recv_impl->callback_map, env); hi;
+ hi = axis2_hash_next ( env, hi))
+ {
+ if (val)
+ AXIS2_FREE ((*env)->allocator, val);
+ val = NULL;
+ }
+
axis2_hash_free(callback_recv_impl->callback_map, env);
callback_recv_impl->callback_map = NULL;
}
@@ -175,8 +185,9 @@
if (msg_id)
{
+ axis2_char_t *mid = AXIS2_STRDUP(msg_id, env);
axis2_hash_set(callback_recv_impl->callback_map,
- msg_id, AXIS2_HASH_KEY_STRING, callback);
+ mid, AXIS2_HASH_KEY_STRING, callback);
}
return AXIS2_SUCCESS;
}
@@ -214,6 +225,7 @@
{
AXIS2_CALLBACK_INVOKE_ON_COMPLETE(callback, env, result);
AXIS2_CALLBACK_SET_COMPLETE(callback, env, AXIS2_TRUE);
+ AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(msg_ctx, env, NULL);
}
AXIS2_ASYNC_RESULT_FREE(result, env);
Modified: webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/context/msg_ctx.c?rev=391526&r1=391525&r2=391526&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/msg_ctx.c Tue Apr 4 22:40:26 2006
@@ -942,6 +942,8 @@
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_SOAP_ENVELOPE_STATE, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
+ else
+ AXIS2_INTF_TO_IMPL(msg_ctx)->soap_envelope = NULL;
return AXIS2_SUCCESS;
}
|