Changeset 102:f1033bc40a67 in qutecom-coip


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

Location:
wifo/owsl/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • wifo/owsl/src/owsl_internal.h

    r0 r102  
    210210        OWSLSocketInfo * (* accept)   (OWSLSocketInfo * socket,       struct sockaddr * address, socklen_t * address_length) ; 
    211211        int              (* close)    (OWSLSocketInfo * socket) ; 
    212         int              (* bind)     (OWSLSocketInfo * socket, const struct sockaddr * address, socklen_t   address_length) ; 
     212        int              (* bind)     (OWSLSocketInfo * socket, struct sockaddr * address, socklen_t   address_length) ; 
    213213        int              (* connect)  (OWSLSocketInfo * socket, const struct sockaddr * address, socklen_t   address_length) ; 
    214214        int              (* listen)   (OWSLSocketInfo * socket, int pending_max) ; 
  • 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 
  • wifo/owsl/src/protocols/owsl_base.h

    r0 r102  
    143143( 
    144144        OWSLSocketInfo * _socket_info_with_system_socket, 
    145         const struct sockaddr * address, 
     145        struct sockaddr * address, 
    146146        socklen_t address_length 
    147147) ; 
  • wifo/owsl/src/protocols/owsl_uoh.c

    r0 r102  
    540540 
    541541static int owsl_uoh_bind(OWSLSocketInfo * _socket_info_with_system_socket, 
    542                                                  const struct sockaddr * address, 
     542                                                 struct sockaddr * address, 
    543543                                                 socklen_t address_length) 
    544544{ 
  • wifo/owsl/src/protocols/owsl_uohs.c

    r0 r102  
    576576 
    577577static int owsl_uohs_bind(OWSLSocketInfo * _socket_info_with_system_socket, 
    578                                                   const struct sockaddr * address, 
     578                                                  struct sockaddr * address, 
    579579                                                  socklen_t address_length) 
    580580{ 
Note: See TracChangeset for help on using the changeset viewer.