[BACK]Return to uipc_socket.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/uipc_socket.c between version 1.42 and 1.43

version 1.42, 1999/01/20 20:24:12 version 1.43, 1999/01/21 22:09:10
Line 162  sofree(so)
Line 162  sofree(so)
         register struct socket *so;          register struct socket *so;
 {  {
   
         /*          if (so->so_pcb || (so->so_state & SS_NOFDREF) == 0)
          * We must not decommission a socket that's on the accept(2) queue.  
          * If we do, then accept(2) may hang even after select(2) indicated  
          * that the listening socket was ready.  
          */  
         if (so->so_pcb || so->so_head || (so->so_state & SS_NOFDREF) == 0)  
                 return;                  return;
           if (so->so_head) {
                   /*
                    * We must not decommission a socket that's on the accept(2)
                    * queue.  If we do, then accept(2) may hang after select(2)
                    * indicated that the listening socket was ready.
                    */
                   if (!soqremque(so, 0))
                           return;
           }
         sbrelease(&so->so_snd);          sbrelease(&so->so_snd);
         sorflush(so);          sorflush(so);
         pool_put(&socket_pool, so);          pool_put(&socket_pool, so);

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

CVSweb <webmaster@jp.NetBSD.org>