[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.160 and 1.165

version 1.160, 2008/04/24 11:38:36 version 1.165, 2008/05/24 18:43:02
Line 15 
Line 15 
  * 2. Redistributions in binary form must reproduce the above copyright   * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the   *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software  
  *    must display the following acknowledgement:  
  *      This product includes software developed by the NetBSD  
  *      Foundation, Inc. and its contributors.  
  * 4. Neither the name of The NetBSD Foundation nor the names of its  
  *    contributors may be used to endorse or promote products derived  
  *    from this software without specific prior written permission.  
  *   *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS   * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
Line 574  solisten(struct socket *so, int backlog,
Line 567  solisten(struct socket *so, int backlog,
   
         solock(so);          solock(so);
         if ((so->so_state & (SS_ISCONNECTED | SS_ISCONNECTING |          if ((so->so_state & (SS_ISCONNECTED | SS_ISCONNECTING |
             SS_ISDISCONNECTING)) != 0)              SS_ISDISCONNECTING)) != 0) {
                   sounlock(so);
                 return (EOPNOTSUPP);                  return (EOPNOTSUPP);
           }
         error = (*so->so_proto->pr_usrreq)(so, PRU_LISTEN, NULL,          error = (*so->so_proto->pr_usrreq)(so, PRU_LISTEN, NULL,
             NULL, NULL, l);              NULL, NULL, l);
         if (error != 0) {          if (error != 0) {
Line 594  solisten(struct socket *so, int backlog,
Line 589  solisten(struct socket *so, int backlog,
 void  void
 sofree(struct socket *so)  sofree(struct socket *so)
 {  {
           u_int refs;
   
         KASSERT(solocked(so));          KASSERT(solocked(so));
   
Line 623  sofree(struct socket *so)
Line 619  sofree(struct socket *so)
         KASSERT(!cv_has_waiters(&so->so_rcv.sb_cv));          KASSERT(!cv_has_waiters(&so->so_rcv.sb_cv));
         KASSERT(!cv_has_waiters(&so->so_snd.sb_cv));          KASSERT(!cv_has_waiters(&so->so_snd.sb_cv));
         sorflush(so);          sorflush(so);
           refs = so->so_aborting; /* XXX */
         sounlock(so);          sounlock(so);
         soput(so);          if (refs == 0)          /* XXX */
                   soput(so);
 }  }
   
 /*  /*
Line 700  soclose(struct socket *so)
Line 698  soclose(struct socket *so)
 int  int
 soabort(struct socket *so)  soabort(struct socket *so)
 {  {
           u_int refs;
         int error;          int error;
   
         KASSERT(solocked(so));          KASSERT(solocked(so));
         KASSERT(so->so_head == NULL);          KASSERT(so->so_head == NULL);
   
           so->so_aborting++;              /* XXX */
         error = (*so->so_proto->pr_usrreq)(so, PRU_ABORT, NULL,          error = (*so->so_proto->pr_usrreq)(so, PRU_ABORT, NULL,
             NULL, NULL, NULL);              NULL, NULL, NULL);
         if (error) {          refs = --so->so_aborting;       /* XXX */
           if (error || (refs == 0)) {
                 sofree(so);                  sofree(so);
         } else {          } else {
                 sounlock(so);                  sounlock(so);
Line 849  sosend(struct socket *so, struct mbuf *a
Line 850  sosend(struct socket *so, struct mbuf *a
         dontroute =          dontroute =
             (flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0 &&              (flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0 &&
             (so->so_proto->pr_flags & PR_ATOMIC);              (so->so_proto->pr_flags & PR_ATOMIC);
         if (l)          l->l_ru.ru_msgsnd++;
                 l->l_ru.ru_msgsnd++;  
         if (control)          if (control)
                 clen = control->m_len;                  clen = control->m_len;
  restart:   restart:

Legend:
Removed from v.1.160  
changed lines
  Added in v.1.165

CVSweb <webmaster@jp.NetBSD.org>