Deleted Added
full compact
server.c (71764) server.c (72436)
1/*-
2 * Copyright (c) 1997 Brian Somers <brian@Awfulhak.org>
3 * 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

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1997 Brian Somers <brian@Awfulhak.org>
3 * 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

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/usr.sbin/ppp/server.c 71764 2001-01-29 01:35:06Z brian $
26 * $FreeBSD: head/usr.sbin/ppp/server.c 72436 2001-02-13 12:33:34Z brian $
27 */
28
29#include <sys/param.h>
30
31#include <sys/socket.h>
32#include <netinet/in.h>
33#include <arpa/inet.h>
34#include <sys/un.h>

--- 62 unchanged lines hidden (view full) ---

97 struct sockaddr_in *in = (struct sockaddr_in *)hisaddr;
98 int ssize = ADDRSZ, wfd;
99 struct prompt *p;
100
101 if (s->fd >= 0 && FD_ISSET(s->fd, fdset)) {
102 wfd = accept(s->fd, sa, &ssize);
103 if (wfd < 0)
104 log_Printf(LogERROR, "server_Read: accept(): %s\n", strerror(errno));
27 */
28
29#include <sys/param.h>
30
31#include <sys/socket.h>
32#include <netinet/in.h>
33#include <arpa/inet.h>
34#include <sys/un.h>

--- 62 unchanged lines hidden (view full) ---

97 struct sockaddr_in *in = (struct sockaddr_in *)hisaddr;
98 int ssize = ADDRSZ, wfd;
99 struct prompt *p;
100
101 if (s->fd >= 0 && FD_ISSET(s->fd, fdset)) {
102 wfd = accept(s->fd, sa, &ssize);
103 if (wfd < 0)
104 log_Printf(LogERROR, "server_Read: accept(): %s\n", strerror(errno));
105 else if (sa->sa_len == 0) {
106 close(wfd);
107 wfd = -1;
108 }
105 } else
106 wfd = -1;
107
108 if (wfd >= 0)
109 switch (sa->sa_family) {
110 case AF_LOCAL:
111 log_Printf(LogPHASE, "Connected to local client.\n");
112 break;

--- 253 unchanged lines hidden ---
109 } else
110 wfd = -1;
111
112 if (wfd >= 0)
113 switch (sa->sa_family) {
114 case AF_LOCAL:
115 log_Printf(LogPHASE, "Connected to local client.\n");
116 break;

--- 253 unchanged lines hidden ---