1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-16 07:58:04 +00:00

accessibility/wl-gammarelay-rs: apply a crashfix

thread 'main' panicked at rustbus-service-7401913977ccf665748b1f4dee033921e1c86afd/src/lib.rs:117:39:
not yet implemented
This commit is contained in:
Jan Beich 2024-03-19 23:13:33 +01:00
parent 4c14ecfaa1
commit 96596ed77a
2 changed files with 22 additions and 0 deletions

View File

@ -1,6 +1,7 @@
PORTNAME= wl-gammarelay-rs
DISTVERSIONPREFIX= v
DISTVERSION= 0.4.0
PORTREVISION= 1
CATEGORIES= accessibility wayland
MAINTAINER= jbeich@FreeBSD.org

View File

@ -0,0 +1,21 @@
https://github.com/MaxVerevkin/wl-gammarelay-rs/issues/22
https://github.com/MaxVerevkin/rustbus-service/commit/681b783ff093
--- ../rustbus-service-7401913977ccf665748b1f4dee033921e1c86afd/src/lib.rs.orig 2024-03-17 08:14:31 UTC
+++ ../rustbus-service-7401913977ccf665748b1f4dee033921e1c86afd/src/lib.rs
@@ -114,7 +114,14 @@ impl<D: 'static> Service<D> {
MessageType::Signal => {
eprintln!("todo: handle signal: {:?}", msg.dynheader.member);
}
- MessageType::Error => todo!(),
+ MessageType::Error => {
+ let error_name = msg.dynheader.error_name.expect("error without error_name");
+ let error_message = msg.body.parser().get::<&str>().ok();
+ eprintln!(
+ "dbus error: {error_name}: {}",
+ error_message.unwrap_or("<no message>")
+ );
+ }
MessageType::Call => {
if let Some(cb) = get_call_handler(&self.root, &msg) {
cb(MethodContext {