Changeset 6149

Show
Ignore:
Timestamp:
01/13/09 16:27:37 (6 months ago)
Author:
kris
Message:

Notify handlers of socket creation for bare raw IP and TCP server sockets

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • framework3/trunk/lib/rex/socket/comm/local.rb

    r6148 r6149  
    4545                sock.setsockopt(::Socket::IPPROTO_IP, ::Socket::IP_HDRINCL, 1) 
    4646 
    47                 return sock if (param.bare?) 
    48  
    49                 sock.extend(::Rex::Socket::Ip) 
    50                 sock.initsock(param) 
     47                if (param.bare? == false) 
     48                        sock.extend(::Rex::Socket::Ip) 
     49                        sock.initsock(param) 
     50                end 
    5151 
    5252                self.instance.notify_socket_created(self, sock, param) 
     
    148148                        sock.listen(32) 
    149149 
    150                         return sock if (param.bare?) 
    151  
    152                         klass = Rex::Socket::TcpServer 
    153                         if (param.ssl) 
    154                                 klass = Rex::Socket::SslTcpServer 
    155                         end 
    156                         sock.extend(klass) 
    157  
    158                         sock.initsock(param) 
     150                        if (param.bare? == false) 
     151                                klass = Rex::Socket::TcpServer 
     152                                if (param.ssl) 
     153                                        klass = Rex::Socket::SslTcpServer 
     154                                end 
     155                                sock.extend(klass) 
     156 
     157                                sock.initsock(param) 
     158                        end 
    159159                # Otherwise, if we're creating a client... 
    160160                else