uipc_socket.c (89376) | uipc_socket.c (90227) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94 |
34 * $FreeBSD: head/sys/kern/uipc_socket.c 89376 2002-01-14 22:03:48Z alfred $ | 34 * $FreeBSD: head/sys/kern/uipc_socket.c 90227 2002-02-05 02:00:56Z dillon $ |
35 */ 36 37#include "opt_inet.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/fcntl.h> 42#include <sys/lock.h> --- 761 unchanged lines hidden (view full) --- 804 orig_resid = 0; 805 if (psa) 806 *psa = dup_sockaddr(mtod(m, struct sockaddr *), 807 mp0 == 0); 808 if (flags & MSG_PEEK) { 809 m = m->m_next; 810 } else { 811 sbfree(&so->so_rcv, m); | 35 */ 36 37#include "opt_inet.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/fcntl.h> 42#include <sys/lock.h> --- 761 unchanged lines hidden (view full) --- 804 orig_resid = 0; 805 if (psa) 806 *psa = dup_sockaddr(mtod(m, struct sockaddr *), 807 mp0 == 0); 808 if (flags & MSG_PEEK) { 809 m = m->m_next; 810 } else { 811 sbfree(&so->so_rcv, m); |
812 MFREE(m, so->so_rcv.sb_mb); | 812 so->so_rcv.sb_mb = m_free(m); |
813 m = so->so_rcv.sb_mb; 814 } 815 } 816 while (m && m->m_type == MT_CONTROL && error == 0) { 817 if (flags & MSG_PEEK) { 818 if (controlp) 819 *controlp = m_copy(m, 0, m->m_len); 820 m = m->m_next; --- 67 unchanged lines hidden (view full) --- 888 nextrecord = m->m_nextpkt; 889 sbfree(&so->so_rcv, m); 890 if (mp) { 891 *mp = m; 892 mp = &m->m_next; 893 so->so_rcv.sb_mb = m = m->m_next; 894 *mp = (struct mbuf *)0; 895 } else { | 813 m = so->so_rcv.sb_mb; 814 } 815 } 816 while (m && m->m_type == MT_CONTROL && error == 0) { 817 if (flags & MSG_PEEK) { 818 if (controlp) 819 *controlp = m_copy(m, 0, m->m_len); 820 m = m->m_next; --- 67 unchanged lines hidden (view full) --- 888 nextrecord = m->m_nextpkt; 889 sbfree(&so->so_rcv, m); 890 if (mp) { 891 *mp = m; 892 mp = &m->m_next; 893 so->so_rcv.sb_mb = m = m->m_next; 894 *mp = (struct mbuf *)0; 895 } else { |
896 MFREE(m, so->so_rcv.sb_mb); | 896 so->so_rcv.sb_mb = m_free(m); |
897 m = so->so_rcv.sb_mb; 898 } 899 if (m) 900 m->m_nextpkt = nextrecord; 901 } 902 } else { 903 if (flags & MSG_PEEK) 904 moff += len; --- 782 unchanged lines hidden --- | 897 m = so->so_rcv.sb_mb; 898 } 899 if (m) 900 m->m_nextpkt = nextrecord; 901 } 902 } else { 903 if (flags & MSG_PEEK) 904 moff += len; --- 782 unchanged lines hidden --- |