Skip to content

Commit

Permalink
accessibility/wl-gammarelay-rs: apply a crashfix
Browse files Browse the repository at this point in the history
thread 'main' panicked at rustbus-service-7401913977ccf665748b1f4dee033921e1c86afd/src/lib.rs:117:39:
not yet implemented
  • Loading branch information
jbeich committed Mar 19, 2024
1 parent 4c14ecf commit 96596ed
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions accessibility/wl-gammarelay-rs/Makefile
@@ -1,6 +1,7 @@
PORTNAME= wl-gammarelay-rs
DISTVERSIONPREFIX= v
DISTVERSION= 0.4.0
PORTREVISION= 1
CATEGORIES= accessibility wayland

MAINTAINER= jbeich@FreeBSD.org
Expand Down
21 changes: 21 additions & 0 deletions accessibility/wl-gammarelay-rs/files/patch-rustbus-service
@@ -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 {

0 comments on commit 96596ed

Please sign in to comment.