diff options
author | David Goulet <dgoulet@torproject.org> | 2019-03-01 13:50:00 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2019-03-05 12:33:43 -0500 |
commit | a999cb43df3dc4e64820347486a2d861636bfc2e (patch) | |
tree | cefceee5b049b12f427fc8bcad1c6e071df531ab /src/rust | |
parent | 955a622391192ff9cb65dddcb110532616f890ff (diff) | |
download | tor-a999cb43df3dc4e64820347486a2d861636bfc2e.tar.gz tor-a999cb43df3dc4e64820347486a2d861636bfc2e.zip |
protover: Add missing Padding to translate_to_rust
This commit also explicitly set the value of the PRT enum so we can match/pin
the C enum values to the Rust one in protover/ffi.rs.
Fixes #29631
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/rust')
-rw-r--r-- | src/rust/protover/ffi.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rust/protover/ffi.rs b/src/rust/protover/ffi.rs index 6ee63adb10..066b08eddb 100644 --- a/src/rust/protover/ffi.rs +++ b/src/rust/protover/ffi.rs @@ -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), } } |