Author: senaka Date: Mon Mar 3 13:25:30 2008 New Revision: 633281 URL: http://svn.apache.org/viewvc?rev=633281&view=rev Log: Fixing some minor errors in uri.c logic
Modified: webservices/axis2/trunk/c/util/src/uri.c Modified: webservices/axis2/trunk/c/util/src/uri.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/uri.c?rev=633281&r1=633280&r2=633281&view=diff ============================================================================== --- webservices/axis2/trunk/c/util/src/uri.c (original) +++ webservices/axis2/trunk/c/util/src/uri.c Mon Mar 3 13:25:30 2008 @@ -425,6 +425,15 @@ */ if (*hostinfo == '[') { + if (*(hostinfo + 1) == ']') + { + if (uri) + { + axutil_uri_free(uri, env); + } + uri = NULL; + goto end; + } uri->is_ipv6 = 1; v6_offset1 = 1; v6_offset2 = 2; @@ -443,7 +452,7 @@ s = NULL; /* no port */ } } - else if (*hostinfo == '[') + else if (*hostinfo == ':') { if (uri) { @@ -547,6 +556,11 @@ */ if (*hostinfo == '[') { + if (*(hostinfo + 1) == ']') + { + axutil_uri_free(uri, env); + return NULL; + } uri->is_ipv6 = 1; rsb = strchr(hostinfo, ']'); if (!rsb || *(rsb + 1) != ':') --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]