mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-01-25 21:53:16 -05:00
upgrade nix, tungstenite deps
This commit is contained in:
parent
689765ea97
commit
e0940979e4
32
server/Cargo.lock
generated
32
server/Cargo.lock
generated
@ -1062,9 +1062,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memoffset"
|
name = "memoffset"
|
||||||
version = "0.6.5"
|
version = "0.7.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
|
checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
]
|
]
|
||||||
@ -1260,16 +1260,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nix"
|
name = "nix"
|
||||||
version = "0.25.1"
|
version = "0.26.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4"
|
checksum = "46a58d1d356c6597d08cde02c2f09d785b09e28711837b1ed667dc652c08a694"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"libc",
|
"libc",
|
||||||
"memoffset",
|
"memoffset",
|
||||||
"pin-utils",
|
"pin-utils",
|
||||||
|
"static_assertions",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1884,10 +1884,10 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sha-1"
|
name = "sha1"
|
||||||
version = "0.10.1"
|
version = "0.10.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c"
|
checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"cpufeatures",
|
"cpufeatures",
|
||||||
@ -1961,6 +1961,12 @@ version = "1.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
|
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "static_assertions"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "structopt"
|
name = "structopt"
|
||||||
version = "0.3.26"
|
version = "0.3.26"
|
||||||
@ -2181,9 +2187,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio-tungstenite"
|
name = "tokio-tungstenite"
|
||||||
version = "0.17.2"
|
version = "0.18.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181"
|
checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"log",
|
"log",
|
||||||
@ -2261,9 +2267,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tungstenite"
|
name = "tungstenite"
|
||||||
version = "0.17.3"
|
version = "0.18.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0"
|
checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
@ -2272,7 +2278,7 @@ dependencies = [
|
|||||||
"httparse",
|
"httparse",
|
||||||
"log",
|
"log",
|
||||||
"rand",
|
"rand",
|
||||||
"sha-1",
|
"sha1",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"url",
|
"url",
|
||||||
"utf-8",
|
"utf-8",
|
||||||
|
@ -42,7 +42,7 @@ libc = "0.2"
|
|||||||
log = { version = "0.4" }
|
log = { version = "0.4" }
|
||||||
memchr = "2.0.2"
|
memchr = "2.0.2"
|
||||||
mylog = { git = "https://github.com/scottlamb/mylog" }
|
mylog = { git = "https://github.com/scottlamb/mylog" }
|
||||||
nix = "0.25.0"
|
nix = "0.26.1"
|
||||||
nom = "7.0.0"
|
nom = "7.0.0"
|
||||||
password-hash = "0.4.2"
|
password-hash = "0.4.2"
|
||||||
protobuf = "3.0"
|
protobuf = "3.0"
|
||||||
@ -58,7 +58,7 @@ sync_wrapper = "0.1.0"
|
|||||||
time = "0.1"
|
time = "0.1"
|
||||||
tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "signal", "sync", "time"] }
|
tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "signal", "sync", "time"] }
|
||||||
tokio-stream = "0.1.5"
|
tokio-stream = "0.1.5"
|
||||||
tokio-tungstenite = "0.17.1"
|
tokio-tungstenite = "0.18.0"
|
||||||
toml = "0.5"
|
toml = "0.5"
|
||||||
tracing = { version = "0.1", features = ["log"] }
|
tracing = { version = "0.1", features = ["log"] }
|
||||||
url = "2.1.1"
|
url = "2.1.1"
|
||||||
|
@ -28,7 +28,7 @@ lazy_static = "1.0"
|
|||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
mylog = { git = "https://github.com/scottlamb/mylog" }
|
mylog = { git = "https://github.com/scottlamb/mylog" }
|
||||||
nix = "0.25.0"
|
nix = "0.26.1"
|
||||||
num-rational = { version = "0.4.0", default-features = false, features = ["std"] }
|
num-rational = { version = "0.4.0", default-features = false, features = ["std"] }
|
||||||
odds = { version = "0.4.0", features = ["std-vec"] }
|
odds = { version = "0.4.0", features = ["std-vec"] }
|
||||||
pretty-hex = "0.3.0"
|
pretty-hex = "0.3.0"
|
||||||
|
@ -298,6 +298,7 @@ impl ReaderInt {
|
|||||||
range
|
range
|
||||||
)
|
)
|
||||||
})?;
|
})?;
|
||||||
|
let map_len = std::num::NonZeroUsize::new(map_len).expect("range is non-empty");
|
||||||
|
|
||||||
let file = crate::fs::openat(self.dir.0, &p, OFlag::O_RDONLY, Mode::empty())
|
let file = crate::fs::openat(self.dir.0, &p, OFlag::O_RDONLY, Mode::empty())
|
||||||
.err_kind(ErrorKind::Unknown)?;
|
.err_kind(ErrorKind::Unknown)?;
|
||||||
@ -306,7 +307,7 @@ impl ReaderInt {
|
|||||||
// for it to be less than the requested read. Check for this now rather than crashing
|
// for it to be less than the requested read. Check for this now rather than crashing
|
||||||
// with a SIGBUS or reading bad data at the end of the last page later.
|
// with a SIGBUS or reading bad data at the end of the last page later.
|
||||||
let metadata = file.metadata().err_kind(ErrorKind::Unknown)?;
|
let metadata = file.metadata().err_kind(ErrorKind::Unknown)?;
|
||||||
if metadata.len() < u64::try_from(offset).unwrap() + u64::try_from(map_len).unwrap() {
|
if metadata.len() < u64::try_from(offset).unwrap() + u64::try_from(map_len.get()).unwrap() {
|
||||||
bail_t!(
|
bail_t!(
|
||||||
Internal,
|
Internal,
|
||||||
"file {}, range {:?}, len {}",
|
"file {}, range {:?}, len {}",
|
||||||
@ -317,7 +318,7 @@ impl ReaderInt {
|
|||||||
}
|
}
|
||||||
let map_ptr = unsafe {
|
let map_ptr = unsafe {
|
||||||
nix::sys::mman::mmap(
|
nix::sys::mman::mmap(
|
||||||
std::ptr::null_mut(),
|
None,
|
||||||
map_len,
|
map_len,
|
||||||
nix::sys::mman::ProtFlags::PROT_READ,
|
nix::sys::mman::ProtFlags::PROT_READ,
|
||||||
nix::sys::mman::MapFlags::MAP_SHARED,
|
nix::sys::mman::MapFlags::MAP_SHARED,
|
||||||
@ -339,7 +340,7 @@ impl ReaderInt {
|
|||||||
if let Err(e) = unsafe {
|
if let Err(e) = unsafe {
|
||||||
nix::sys::mman::madvise(
|
nix::sys::mman::madvise(
|
||||||
map_ptr as *mut libc::c_void,
|
map_ptr as *mut libc::c_void,
|
||||||
map_len,
|
map_len.get(),
|
||||||
nix::sys::mman::MmapAdvise::MADV_SEQUENTIAL,
|
nix::sys::mman::MmapAdvise::MADV_SEQUENTIAL,
|
||||||
)
|
)
|
||||||
} {
|
} {
|
||||||
@ -357,7 +358,7 @@ impl ReaderInt {
|
|||||||
composite_id,
|
composite_id,
|
||||||
map_ptr,
|
map_ptr,
|
||||||
map_pos: unaligned,
|
map_pos: unaligned,
|
||||||
map_len,
|
map_len: map_len.get(),
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user