add logging
This commit is contained in:
parent
24095fb80c
commit
92ba5b1a75
2 changed files with 5 additions and 3 deletions
|
|
@ -129,7 +129,7 @@ impl AuthHandler {
|
||||||
};
|
};
|
||||||
|
|
||||||
let Ok(passwd) = client.get_nex_password(pid).await else {
|
let Ok(passwd) = client.get_nex_password(pid).await else {
|
||||||
warn!("unable to get nex password");
|
warn!("unable to get nex password for pid: {}:", pid);
|
||||||
return Err(ErrorCode::Core_Exception);
|
return Err(ErrorCode::Core_Exception);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use log::warn;
|
use log::{info, warn};
|
||||||
use rnex_core::rmc::structures::{Result, RmcSerialize};
|
use rnex_core::rmc::structures::{Result, RmcSerialize};
|
||||||
use std::io::{Cursor, Read, Write};
|
use std::io::{Cursor, Read, Write};
|
||||||
use v_byte_helpers::{IS_BIG_ENDIAN, ReadExtensions};
|
use v_byte_helpers::{IS_BIG_ENDIAN, ReadExtensions};
|
||||||
|
|
@ -28,10 +28,12 @@ impl RmcSerialize for Any {
|
||||||
let mut cursor = Cursor::new(&buf);
|
let mut cursor = Cursor::new(&buf);
|
||||||
let len2: u32 = cursor.read_struct(IS_BIG_ENDIAN)?;
|
let len2: u32 = cursor.read_struct(IS_BIG_ENDIAN)?;
|
||||||
|
|
||||||
if len2 as usize + 1 != size {
|
if len2 as usize + 3 != size {
|
||||||
warn!("mismatched sizes on any: {} vs {}", size, len2 + 1);
|
warn!("mismatched sizes on any: {} vs {}", size, len2 + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info!("any data: {}", hex::encode(&buf));
|
||||||
|
|
||||||
Ok(Any {
|
Ok(Any {
|
||||||
name,
|
name,
|
||||||
data: (&buf[4..]).to_owned(),
|
data: (&buf[4..]).to_owned(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue