summaryrefslogtreecommitdiff
path: root/pflocal
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2008-07-22 13:54:29 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2008-07-22 13:54:29 +0000
commitaf60f4b1d4d38fb12b2be5600c128c87fe7b4945 (patch)
tree36787d7fbe59b3ed8f28dd88926da418c9c4d641 /pflocal
parent0b91efcd6abf8375d4f9e6ead6621b468f3c6fc1 (diff)
2008-07-22 Samuel Thibault <samuel.thibault@ens-lyon.org>
* socket.c (S_socket_send): Release a reader reference instead of a writer reference when the destination is given.
Diffstat (limited to 'pflocal')
-rw-r--r--pflocal/ChangeLog2
-rw-r--r--pflocal/socket.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/pflocal/ChangeLog b/pflocal/ChangeLog
index 6c3b1d14..696b9adb 100644
--- a/pflocal/ChangeLog
+++ b/pflocal/ChangeLog
@@ -3,6 +3,8 @@
* pf.c (S_socket_fabricate_address): Drop one reference from addr since
we only take the send right.
* socket.c (S_socket_name): Likewise.
+ (S_socket_send): Release a reader reference instead of a writer
+ reference when the destination is given.
2007-11-13 Thomas Schwinge <tschwinge@gnu.org>
diff --git a/pflocal/socket.c b/pflocal/socket.c
index a2cd242b..06777cab 100644
--- a/pflocal/socket.c
+++ b/pflocal/socket.c
@@ -323,7 +323,10 @@ S_socket_send (struct sock_user *user, struct addr *dest_addr, int flags,
source_addr, data, data_len,
control, control_len, ports, num_ports,
amount);
- pipe_release_writer (pipe);
+ if (dest_sock)
+ pipe_release_reader (pipe);
+ else
+ pipe_release_writer (pipe);
}
if (err)