axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shan...@apache.org
Subject svn commit: r890757 - in /webservices/axis2/trunk/c: src/core/transport/http/sender/http_sender.c src/core/transport/http/util/http_transport_utils.c util/src/url.c
Date Tue, 15 Dec 2009 11:12:05 GMT
Author: shankar
Date: Tue Dec 15 11:12:05 2009
New Revision: 890757

URL: http://svn.apache.org/viewvc?rev=890757&view=rev
Log:
Fixing windows crash due to save session + keep alive

Modified:
    webservices/axis2/trunk/c/src/core/transport/http/sender/http_sender.c
    webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c
    webservices/axis2/trunk/c/util/src/url.c

Modified: webservices/axis2/trunk/c/src/core/transport/http/sender/http_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/sender/http_sender.c?rev=890757&r1=890756&r2=890757&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/sender/http_sender.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/sender/http_sender.c Tue Dec 15 11:12:05
2009
@@ -1598,7 +1598,7 @@
                                     if(http_client)
                                     {
                                         /* Dont' free http client here. It is freed by op_client
*/
-                                        axutil_hash_set(connection_map, server, 
+                                        axutil_hash_set(connection_map, axutil_strdup(env,
server),
                                                 AXIS2_HASH_KEY_STRING, NULL);
                                     }
                                 }

Modified: webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c?rev=890757&r1=890756&r2=890757&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c Tue Dec
15 11:12:05 2009
@@ -3669,7 +3669,7 @@
                         {
                             AXIS2_FREE(env->allocator, cookie);
                         }
-                        axutil_hash_set(session_map, server, AXIS2_HASH_KEY_STRING, NULL);
+                        axutil_hash_set(session_map, axutil_strdup(env, server), AXIS2_HASH_KEY_STRING,
NULL);
                     }
                 }
                 axutil_url_free(url, env);

Modified: webservices/axis2/trunk/c/util/src/url.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/url.c?rev=890757&r1=890756&r2=890757&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/url.c (original)
+++ webservices/axis2/trunk/c/util/src/url.c Tue Dec 15 11:12:05 2009
@@ -481,6 +481,7 @@
     else if(!url->host)
     {
         AXIS2_FREE(env->allocator, url->server);
+        url->server = NULL;
         return NULL;
     }
     else if(url->server)
@@ -492,9 +493,9 @@
     {
         print_port = AXIS2_TRUE;
         sprintf(port_str, "%d", url->port);
-        len += axutil_strlen(port_str);
+        len += axutil_strlen(port_str) + 1; /* +1 is for ':' */
     }
-    url->server = (axis2_char_t *)AXIS2_MALLOC(env->allocator, len + 1);
+    url->server = (axis2_char_t *)AXIS2_MALLOC(env->allocator, len + 1); /* +1 is for
'/0' */
     sprintf(url->server, "%s%s%s", url->host, (print_port) ? ":" : "", (print_port)
? port_str : "");
     return url->server;
 }



Mime
View raw message