From 0e7a508b863c1338858c3dfc3a0dd208704edaa6 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sun, 2 Jul 1995 18:49:03 +0000 Subject: Formerly pf.c.~3~ --- pflocal/pf.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'pflocal') diff --git a/pflocal/pf.c b/pflocal/pf.c index fd23d028..bb29c03f 100644 --- a/pflocal/pf.c +++ b/pflocal/pf.c @@ -18,6 +18,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* Create a new socket. Sock type is, for example, SOCK_STREAM, + SOCK_DGRAM, or some such. */ S_socket_create (struct trivfs_protid *cred, int sock_type, int protocol, mach_port_t *port, mach_msg_type_name_t *port_type) @@ -35,16 +37,17 @@ S_socket_create (struct trivfs_protid *cred, switch (sock_type) { case SOCK_STREAM: - pipe_ops = stream_pipe_ops; break; + pipe_class = stream_pipe_class; break; case SOCK_DGRAM: - pipe_ops = dgram_pipe_ops; break; + pipe_class = dgram_pipe_class; break; default: return ESOCKTNOSUPPORT; } - err = sock_create (pipe_ops, &sock); + err = sock_create (pipe_class, &sock); if (!err) - err = sock_create_port (sock, port, port_type); - + err = sock_create_port (sock, port); + *port_type = MACH_MSG_TYPE_MAKE_SEND; + return err; } -- cgit v1.2.3