aboutsummaryrefslogtreecommitdiff
path: root/src/rust/protover/ffi.rs
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-17 11:50:46 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-17 11:57:56 -0400
commit80ad15921cef42ac12da356584f217d2ead5cb09 (patch)
tree10b3ec213d867374b92a0935b043feec73602c96 /src/rust/protover/ffi.rs
parenta546e07600151be275e6134407c2bcb833a3dd97 (diff)
downloadtor-80ad15921cef42ac12da356584f217d2ead5cb09.tar.gz
tor-80ad15921cef42ac12da356584f217d2ead5cb09.zip
Remove extraneous argument from Rust protover_compute_vote()
This argument was added to match an older idea for the C api, but we decided not to do it that way in C. Fixes bug 27741; bugfix on 0.3.3.6 / TROVE-2018-005 fix.
Diffstat (limited to 'src/rust/protover/ffi.rs')
-rw-r--r--src/rust/protover/ffi.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/rust/protover/ffi.rs b/src/rust/protover/ffi.rs
index 9656e8c318..f803bd0155 100644
--- a/src/rust/protover/ffi.rs
+++ b/src/rust/protover/ffi.rs
@@ -207,8 +207,7 @@ pub extern "C" fn protover_get_supported_protocols() -> *const c_char {
#[no_mangle]
pub extern "C" fn protover_compute_vote(
list: *const Stringlist,
- threshold: c_int,
- allow_long_proto_names: bool,
+ threshold: c_int
) -> *mut c_char {
if list.is_null() {
@@ -223,13 +222,9 @@ pub extern "C" fn protover_compute_vote(
let mut proto_entries: Vec<UnvalidatedProtoEntry> = Vec::new();
for datum in data {
- let entry: UnvalidatedProtoEntry = match allow_long_proto_names {
- true => match UnvalidatedProtoEntry::from_str_any_len(datum.as_str()) {
- Ok(n) => n,
- Err(_) => continue},
- false => match datum.parse() {
- Ok(n) => n,
- Err(_) => continue},
+ let entry: UnvalidatedProtoEntry = match datum.parse() {
+ Ok(n) => n,
+ Err(_) => continue
};
proto_entries.push(entry);
}