Skip to content

Commit

Permalink
Minor bugfix and code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
RipleyTom committed Jan 29, 2024
1 parent 27fc83d commit 9e0a7a4
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 108 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.1] - 2024-01-29

### Fixed

- Fixed GetScoreData accidentally returning a u64 for size of data


## [1.0.0] - 2024-01-14

### Added
Expand Down
90 changes: 45 additions & 45 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rpcn"
version = "1.0.0"
version = "1.0.1"
authors = ["RipleyTom <RipleyTom@users.noreply.github.com>"]
edition = "2021"

Expand Down
10 changes: 8 additions & 2 deletions src/server/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,12 @@ impl Client {
})
}

pub fn add_data_packet(reply: &mut Vec<u8>, data: &Vec<u8>)
{
reply.extend(&(data.len() as u32).to_le_bytes());
reply.extend(data);
}

fn get_com_id_with_redir(&mut self, data: &mut StreamExtractor) -> ComId {
let com_id = data.get_com_id();
let final_com_id = self.config.read().get_server_redirection(com_id);
Expand Down Expand Up @@ -868,8 +874,8 @@ impl Client {
}
let ticket_blob = ticket.generate_blob();

reply.extend(&(ticket_blob.len() as u32).to_le_bytes());
reply.extend(ticket_blob);
Client::add_data_packet(reply, &ticket_blob);


Ok(ErrorType::NoError)
}
Expand Down
Loading

0 comments on commit 9e0a7a4

Please sign in to comment.