diff options
author | Miles Bader <miles@gnu.org> | 1995-07-02 18:49:03 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-07-02 18:49:03 +0000 |
commit | 0e7a508b863c1338858c3dfc3a0dd208704edaa6 (patch) | |
tree | db1be4ceccecf2e3c49df74dfd720ad9a9761f21 /pflocal | |
parent | ab09aad48d4a5f6145322cc7916a9870db3c6a5a (diff) |
Formerly pf.c.~3~
Diffstat (limited to 'pflocal')
-rw-r--r-- | pflocal/pf.c | 13 |
1 files changed, 8 insertions, 5 deletions
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; } |