Revert "add some logging"
how did i fuck up this bad
This reverts commit 1a47d28362.
This commit is contained in:
parent
1a47d28362
commit
675de4237a
2 changed files with 8 additions and 16 deletions
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"rust-analyzer.cargo.features": [
|
||||
"v3-8-15", "splatoon", "prudpv1"
|
||||
"friends"
|
||||
]
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ use std::env;
|
|||
use std::str::FromStr;
|
||||
|
||||
use cfg_if::cfg_if;
|
||||
use log::{error, info, warn};
|
||||
use log::{error, info};
|
||||
use macros::rmc_struct;
|
||||
use rnex_core::prudp::socket_addr::PRUDPSockAddr;
|
||||
use rnex_core::rmc::protocols::notifications::{NotificationEvent, RemoteNotification};
|
||||
|
|
@ -100,7 +100,7 @@ impl Secure for User {
|
|||
) -> Result<(QResult, u32, StationUrl), ErrorCode> {
|
||||
let cid = self.matchmake_manager.next_cid();
|
||||
|
||||
// println!("{:?}", station_urls);
|
||||
println!("{:?}", station_urls);
|
||||
|
||||
let mut users = self.matchmake_manager.users.write().await;
|
||||
users.insert(cid, self.this.clone());
|
||||
|
|
@ -135,15 +135,11 @@ impl Secure for User {
|
|||
async fn replace_url(&self, target_url: StationUrl, dest: StationUrl) -> Result<(), ErrorCode> {
|
||||
let mut lock = self.station_url.write().await;
|
||||
|
||||
info!("debug: target URL is {:?}", target_url);
|
||||
|
||||
let Some(target_addr) = target_url.options.iter().find(|v| matches!(v, Address(_))) else {
|
||||
warn!("address doesnt match");
|
||||
return Err(ErrorCode::Core_InvalidArgument);
|
||||
};
|
||||
|
||||
let Some(target_port) = target_url.options.iter().find(|v| matches!(v, Port(_))) else {
|
||||
warn!("port doesnt match");
|
||||
return Err(ErrorCode::Core_InvalidArgument);
|
||||
};
|
||||
|
||||
|
|
@ -151,7 +147,6 @@ impl Secure for User {
|
|||
url.options.iter().any(|o| o == target_addr)
|
||||
&& url.options.iter().any(|o| o == target_port)
|
||||
}) else {
|
||||
warn!("the third one failed");
|
||||
return Err(ErrorCode::Core_InvalidArgument);
|
||||
};
|
||||
*replacement_target = dest;
|
||||
|
|
@ -202,7 +197,7 @@ impl MatchmakeExtension for User {
|
|||
&self,
|
||||
create_session_param: CreateMatchmakeSessionParam,
|
||||
) -> Result<MatchmakeSession, ErrorCode> {
|
||||
// println!("{:?}", create_session_param);
|
||||
println!("{:?}", create_session_param);
|
||||
|
||||
let gid = self.matchmake_manager.next_gid();
|
||||
|
||||
|
|
@ -316,7 +311,7 @@ impl MatchmakeExtension for User {
|
|||
&self,
|
||||
param: AutoMatchmakeParam,
|
||||
) -> Result<MatchmakeSession, ErrorCode> {
|
||||
// println!("{:?}", param);
|
||||
println!("{:?}", param);
|
||||
|
||||
let mut joining_players = vec![self.this.clone()];
|
||||
|
||||
|
|
@ -345,10 +340,9 @@ impl MatchmakeExtension for User {
|
|||
for session in sessions.values() {
|
||||
let mut session = session.lock().await;
|
||||
|
||||
// println!("checking session!");
|
||||
println!("checking session!");
|
||||
|
||||
if !session.is_joinable() {
|
||||
warn!("session was not joinable, skipping");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -361,7 +355,6 @@ impl MatchmakeExtension for User {
|
|||
}
|
||||
|
||||
if bool_matched_criteria {
|
||||
info!("{:?}", session);
|
||||
session
|
||||
.add_players(&joining_players, param.join_message)
|
||||
.await;
|
||||
|
|
@ -372,8 +365,7 @@ impl MatchmakeExtension for User {
|
|||
|
||||
drop(sessions);
|
||||
|
||||
// println!("making new session!");
|
||||
info!("making new session");
|
||||
println!("making new session!");
|
||||
|
||||
let AutoMatchmakeParam {
|
||||
join_message,
|
||||
|
|
@ -577,7 +569,7 @@ impl Matchmake for User {
|
|||
.ok_or(ErrorCode::RendezVous_SessionClosed)?
|
||||
.await;
|
||||
|
||||
info!("getstationurls URLs: {:?}", urls);
|
||||
println!("{:?}", urls);
|
||||
|
||||
if urls.is_empty() {
|
||||
return Err(ErrorCode::RendezVous_NotParticipatedGathering);
|
||||
|
|
|
|||
Loading…
Reference in a new issue