Ignore:
Timestamp:
Apr 14, 2008 5:16:01 PM (5 years ago)
Author:
vadim@…
Branch:
default
Message:

Modify owsl layer to retrieve the real port number to which the socket is bound

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wifo/owsl/src/protocols/owsl_base.c

    r0 r102  
    261261( 
    262262        OWSLSocketInfo * socket_info_with_system_socket, 
    263         const struct sockaddr * address, 
     263        struct sockaddr * address, 
    264264        socklen_t address_length 
    265265) 
    266266{ 
     267        int ret; 
    267268        OWSLSocketInfo_with_SystemSocket * socket = (OWSLSocketInfo_with_SystemSocket *) socket_info_with_system_socket ; 
    268         return bind (socket->system_socket, address, address_length) ; 
     269        ret = bind (socket->system_socket, address, address_length) ; 
     270        if (!ret) 
     271        { 
     272            socklen_t slen = address_length; 
     273            getsockname(socket->system_socket, address, &slen); 
     274        } 
     275        return ret; 
    269276} 
    270277 
Note: See TracChangeset for help on using the changeset viewer.