Skip to content
Snippets Groups Projects
Commit f1890707 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Merge branch 'maint-0.4.0'

parents d24acc00 a999cb43
No related branches found
No related tags found
No related merge requests found
o Minor bugfixes (Rust, protover):
- The Rust implementation of protover was missing the "Padding" value in
the translate function from C to Rust. Fixes bug 29631; bugfix on
0.4.0.1-alpha.
......@@ -33,17 +33,17 @@ struct smartlist_t;
/// C_RUST_COUPLED: src/rust/protover/ffi.rs `translate_to_rust`
/// C_RUST_COUPLED: src/rust/protover/protover.rs `Proto`
typedef enum protocol_type_t {
PRT_LINK,
PRT_LINKAUTH,
PRT_RELAY,
PRT_DIRCACHE,
PRT_HSDIR,
PRT_HSINTRO,
PRT_HSREND,
PRT_DESC,
PRT_MICRODESC,
PRT_CONS,
PRT_PADDING,
PRT_LINK = 0,
PRT_LINKAUTH = 1,
PRT_RELAY = 2,
PRT_DIRCACHE = 3,
PRT_HSDIR = 4,
PRT_HSINTRO = 5,
PRT_HSREND = 6,
PRT_DESC = 7,
PRT_MICRODESC = 8,
PRT_CONS = 9,
PRT_PADDING = 10,
} protocol_type_t;
bool protover_contains_long_protocol_names(const char *s);
......
......@@ -30,6 +30,7 @@ fn translate_to_rust(c_proto: uint32_t) -> Result<Protocol, ProtoverError> {
7 => Ok(Protocol::Desc),
8 => Ok(Protocol::Microdesc),
9 => Ok(Protocol::Cons),
10 => Ok(Protocol::Padding),
_ => Err(ProtoverError::UnknownProtocol),
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment