Ignore:
Timestamp:
May 20, 2016 4:17:00 AM (8 years ago)
Author:
ming
Message:

Re #1922: Replace IPv4 specific APIs as per Apple's recommendations

https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW27

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/samples/siprtp.c

    r5277 r5311  
    848848static pj_status_t init_options(int argc, char *argv[]) 
    849849{ 
    850     static char ip_addr[32]; 
     850    static char ip_addr[PJ_INET_ADDRSTRLEN]; 
    851851    static char local_uri[64]; 
    852852 
     
    893893        hostname = pj_gethostname(); 
    894894        pj_sockaddr_in_init(&tmp_addr, hostname, 0); 
    895         addr = pj_inet_ntoa(tmp_addr.sin_addr); 
    896         pj_ansi_strcpy(ip_addr, addr); 
     895        pj_inet_ntop(pj_AF_INET(), &tmp_addr.sin_addr, ip_addr, 
     896                     sizeof(ip_addr)); 
    897897    } 
    898898 
Note: See TracChangeset for help on using the changeset viewer.