Skip to content

Commit

Permalink
Allow receiving multiple FD over a ControlMessage
Browse files Browse the repository at this point in the history
Fixes #464
  • Loading branch information
roblabla committed Sep 1, 2017
1 parent 11244ba commit 4debb45
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
# Fixed
- Fix compilation and tests for OpenBSD targets
([#688](https://github.com/nix-rust/nix/pull/688))
- Fixed receiving multiple File Descriptors over a Unix Socket
([#473](https://github.com/nix-rust/nix/pull/473))

# Removed
- The syscall module has been removed. This only exposed enough functionality for
Expand Down
2 changes: 1 addition & 1 deletion src/sys/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ impl<'a> Iterator for CmsgIterator<'a> {
(libc::SOL_SOCKET, libc::SCM_RIGHTS) => unsafe {
Some(ControlMessage::ScmRights(
slice::from_raw_parts(
&cmsg.cmsg_data as *const _ as *const _, 1)))
&cmsg.cmsg_data as *const _ as *const _, len / mem::size_of::<RawFd>())))
},
(_, _) => unsafe {
Some(ControlMessage::Unknown(UnknownCmsg(
Expand Down
1 change: 0 additions & 1 deletion test/sys/test_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ pub fn test_syscontrol() {
}

#[test]
#[ignore]
fn test_scm_rights_multiple_fd() {
use std::os::unix::net::UnixDatagram;
use std::os::unix::io::{RawFd, AsRawFd};
Expand Down

0 comments on commit 4debb45

Please sign in to comment.