Skip to content

Commit

Permalink
DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
pbor committed Nov 2, 2023
1 parent 99b3b0a commit 3a6ace4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gio/src/unix_socket_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,23 @@ impl UnixSocketAddress {

let type_ = address_type.to_type();
let (path, len) = match address_type {
Path(path) => (path.to_glib_none().0, -1),
Path(path) => {
unsafe {
let p = std::ffi::CStr::from_ptr(path.to_glib_none().0);
panic!("{address_type:?} {p:?}");
}
(path.to_glib_none().0, -1)
}
Abstract(path) | AbstractPadded(path) => (
path.to_glib_none().0 as *mut libc::c_char,
path.len() as i32,
),
Anonymous => (ptr::null_mut(), 0),
};
unsafe {
let p = std::ffi::CStr::from_ptr(path);
panic!("{address_type:?} {p:?} {len}");

SocketAddress::from_glib_full(ffi::g_unix_socket_address_new_with_type(
path,
len,
Expand Down

0 comments on commit 3a6ace4

Please sign in to comment.