[asterisk-scf-commits] asterisk-scf/release/pjproject.git branch "veesix" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Nov 30 16:04:37 CST 2010


branch "veesix" has been updated
       via  75bee31e37f0577952c635e00223593aaf93d2c6 (commit)
      from  377d617d20552414f9486593cee723c1781e7449 (commit)

Summary of changes:
 pjlib/src/pj/addr_resolv_sock.c |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)


- Log -----------------------------------------------------------------
commit 75bee31e37f0577952c635e00223593aaf93d2c6
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Nov 30 16:09:29 2010 -0600

    Remove the square bracket logic from address resolution.
    
    I corrected this problem at its root and so this extra
    logic isn't needed any more.

diff --git a/pjlib/src/pj/addr_resolv_sock.c b/pjlib/src/pj/addr_resolv_sock.c
index aff1c15..8f63c86 100644
--- a/pjlib/src/pj/addr_resolv_sock.c
+++ b/pjlib/src/pj/addr_resolv_sock.c
@@ -102,18 +102,9 @@ PJ_DEF(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *nodename,
     /* Copy node name to null terminated string. */
     if (nodename->slen >= PJ_MAX_HOSTNAME)
 	return PJ_ENAMETOOLONG;
-    /* If an IPv6 address with square brackets is passed in, we
-     * don't want that
-     */
-    if (nodename->ptr[0] == '[' && nodename->ptr[nodename->slen - 1] == ']')
-    {
-        pj_memcpy(nodecopy, nodename->ptr + 1, nodename->slen - 2);
-        nodecopy[nodename->slen - 2] = '\0';
-    } else
-    {
-        pj_memcpy(nodecopy, nodename->ptr, nodename->slen);
-        nodecopy[nodename->slen] = '\0';
-    }
+
+    pj_memcpy(nodecopy, nodename->ptr, nodename->slen);
+    nodecopy[nodename->slen] = '\0';
 
     /* Call getaddrinfo() */
     pj_bzero(&hint, sizeof(hint));

-----------------------------------------------------------------------


-- 
asterisk-scf/release/pjproject.git



More information about the asterisk-scf-commits mailing list