Ignore:
Timestamp:
Nov 17, 2016 4:38:25 AM (8 years ago)
Author:
ming
Message:

Fixed #1979: Add support to parse address string with scope ID

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/sock_common.c

    r5444 r5485  
    173173 
    174174    if (str_addr && str_addr->slen) { 
     175#if defined(PJ_SOCKADDR_USE_GETADDRINFO) && PJ_SOCKADDR_USE_GETADDRINFO!=0 
     176        if (1) { 
     177#else 
    175178        status = pj_inet_pton(PJ_AF_INET6, str_addr, &addr->ipv6.sin6_addr); 
    176179        if (status != PJ_SUCCESS) { 
     180#endif 
    177181            pj_addrinfo ai; 
    178182            unsigned count = 1; 
     
    182186                pj_memcpy(&addr->ipv6.sin6_addr, &ai.ai_addr.ipv6.sin6_addr, 
    183187                          sizeof(addr->ipv6.sin6_addr)); 
     188                addr->ipv6.sin6_scope_id = ai.ai_addr.ipv6.sin6_scope_id; 
    184189            } 
    185190        } 
Note: See TracChangeset for help on using the changeset viewer.