diff options
author | open-trade <[email protected]> | 2020-04-21 23:49:31 +0800 |
---|---|---|
committer | open-trade <[email protected]> | 2020-04-21 23:49:31 +0800 |
commit | 9feb083a37b1b607fb07c3a25f4f8a49c1afab33 (patch) | |
tree | 647fbe40245a03095ac9684e7c08ef821e6b9bb3 /src | |
parent | a21a47a2a67158549bc563896073bbb5e076935c (diff) | |
download | rustdesk-server-9feb083a37b1b607fb07c3a25f4f8a49c1afab33.tar.gz rustdesk-server-9feb083a37b1b607fb07c3a25f4f8a49c1afab33.zip |
upgrade protobuf
Diffstat (limited to 'src')
-rw-r--r-- | src/rendezvous_server.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index 8e4bf26..e75f993 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -43,7 +43,7 @@ impl RendezvousServer { ) -> ResultType<()> { if let Ok(msg_in) = parse_from_bytes::<RendezvousMessage>(&bytes) { match msg_in.union { - Some(RendezvousMessage_oneof_union::register_peer(rp)) => { + Some(rendezvous_message::Union::register_peer(rp)) => { // B registered if rp.id.len() > 0 { log::debug!("New peer registered: {:?} {:?}", &rp.id, &addr); @@ -53,7 +53,7 @@ impl RendezvousServer { socket.send(&msg_out, addr).await? } } - Some(RendezvousMessage_oneof_union::punch_hole_request(ph)) => { + Some(rendezvous_message::Union::punch_hole_request(ph)) => { // punch hole request from A, forward to B, // check if in same intranet first, // fetch local addrs if in same intranet. @@ -99,13 +99,13 @@ impl RendezvousServer { } else { let mut msg_out = RendezvousMessage::new(); msg_out.set_punch_hole_response(PunchHoleResponse { - failure: PunchHoleResponse_Failure::ID_NOT_EXIST, + failure: punch_hole_response::Failure::ID_NOT_EXIST.into(), ..Default::default() }); socket.send(&msg_out, addr).await? } } - Some(RendezvousMessage_oneof_union::punch_hole_sent(phs)) => { + Some(rendezvous_message::Union::punch_hole_sent(phs)) => { // punch hole sent from B, tell A that B is ready to be connected let addr_a = AddrMangle::decode(&phs.socket_addr); log::debug!("Punch hole response to {:?} from {:?}", &addr_a, &addr); @@ -116,7 +116,7 @@ impl RendezvousServer { }); socket.send(&msg_out, addr_a).await?; } - Some(RendezvousMessage_oneof_union::local_addr(la)) => { + Some(rendezvous_message::Union::local_addr(la)) => { // forward local addrs of B to A let addr_a = AddrMangle::decode(&la.socket_addr); log::debug!("Local addrs response to {:?} from {:?}", &addr_a, &addr); @@ -137,7 +137,7 @@ impl RendezvousServer { #[cfg(test)] mod tests { use super::*; - use hbb_common::{tokio}; + use hbb_common::tokio; #[allow(unused_must_use)] #[tokio::main] |