Ignore:
Timestamp:
Dec 1, 2007 8:52:57 AM (17 years ago)
Author:
bennylp
Message:

More ticket #415: more IPv6 and some reorganization of the source codes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/os_core_symbian.cpp

    r1589 r1601  
    155155: isSocketServInitialized_(false), isResolverInitialized_(false), 
    156156  console_(NULL), selectTimeoutTimer_(NULL), 
    157   appSocketServ_(NULL), appConnection_(NULL), appHostResolver_(NULL) 
     157  appSocketServ_(NULL), appConnection_(NULL), appHostResolver_(NULL), 
     158  appHostResolver6_(NULL) 
    158159{ 
    159160} 
     
    165166    appConnection_ = (RConnection*) params->rconnection; 
    166167    appHostResolver_ = (RHostResolver*) params->rhostresolver; 
     168    appHostResolver6_ = (RHostResolver*) params->rhostresolver6; 
    167169} 
    168170 
     
    200202    } 
    201203 
    202     if (!isResolverInitialized_ && appHostResolver_ == NULL) { 
    203         if (Connection()) 
    204             err = hostResolver_.Open(SocketServ(), KAfInet, KSockStream, 
    205                                      *Connection()); 
    206         else 
    207             err = hostResolver_.Open(SocketServ(), KAfInet, KSockStream); 
     204    if (!isResolverInitialized_) { 
     205        if (appHostResolver_ == NULL) { 
     206            if (Connection()) 
     207                err = hostResolver_.Open(SocketServ(), KAfInet, KSockStream, 
     208                                         *Connection()); 
     209            else 
     210                err = hostResolver_.Open(SocketServ(), KAfInet, KSockStream); 
    208211         
    209         if (err != KErrNone) 
    210             goto on_error; 
    211  
     212            if (err != KErrNone) 
     213                goto on_error; 
     214        } 
     215         
     216        if (appHostResolver6_ == NULL) { 
     217            if (Connection()) 
     218                err = hostResolver6_.Open(SocketServ(), KAfInet6, KSockStream, 
     219                                          *Connection()); 
     220            else 
     221                err = hostResolver6_.Open(SocketServ(), KAfInet6, KSockStream); 
     222         
     223            if (err != KErrNone) 
     224                goto on_error; 
     225        } 
     226         
    212227        isResolverInitialized_ = true; 
    213228    } 
     
    225240    if (isResolverInitialized_) { 
    226241        hostResolver_.Close(); 
     242        hostResolver6_.Close(); 
    227243        isResolverInitialized_ = false; 
    228244    } 
Note: See TracChangeset for help on using the changeset viewer.