diff options
author | Roland McGrath <roland@gnu.org> | 2000-02-07 02:25:57 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2000-02-07 02:25:57 +0000 |
commit | eee4d4133d6f7ccbda6bbddfabf7746054ad36d1 (patch) | |
tree | 078264899234c898542fbf816e0119a5a2f44ecd /pfinet/socket.c | |
parent | 96b2a9a9c243bf9d93b3b2737aef62e281000097 (diff) | |
download | hurd-eee4d4133d6f7ccbda6bbddfabf7746054ad36d1.tar.gz hurd-eee4d4133d6f7ccbda6bbddfabf7746054ad36d1.tar.bz2 hurd-eee4d4133d6f7ccbda6bbddfabf7746054ad36d1.zip |
2000-02-06 Roland McGrath <roland@baalperazim.frob.com>
* socket.c (make_sock_user): Take new argument CONSUME.
* pfinet.h: Update decl.
* io-ops.c (S_io_reauthenticate, S_io_restrict_auth, S_io_duplicate):
Callers changed, these all pass false.
* socket-ops.c (S_socket_create, S_socket_accept): Callers changed,
these ones pass true.
Diffstat (limited to 'pfinet/socket.c')
-rw-r--r-- | pfinet/socket.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pfinet/socket.c b/pfinet/socket.c index 52bd37ff..82935a57 100644 --- a/pfinet/socket.c +++ b/pfinet/socket.c @@ -59,9 +59,10 @@ sock_alloc (void) } /* Create a sock_user structure, initialized from SOCK and ISROOT. - If NOINSTALL is set, don't put it in the portset. */ + If NOINSTALL is set, don't put it in the portset. + We increment SOCK->refcnt iff CONSUME is zero. */ struct sock_user * -make_sock_user (struct socket *sock, int isroot, int noinstall) +make_sock_user (struct socket *sock, int isroot, int noinstall, int consume) { error_t err; struct sock_user *user; @@ -81,7 +82,8 @@ make_sock_user (struct socket *sock, int isroot, int noinstall) in the original Linux structure), because there can be multiple ports (struct sock_user, aka protids) pointing to the same socket. The socket lives until all the ports die. */ - ++sock->refcnt; + if (! consume) + ++sock->refcnt; user->isroot = isroot; user->sock = sock; return user; |