Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering signals by arguments does not work #367

Closed
TomasKorbar opened this issue May 27, 2024 · 3 comments
Closed

Filtering signals by arguments does not work #367

TomasKorbar opened this issue May 27, 2024 · 3 comments

Comments

@TomasKorbar
Copy link

TomasKorbar commented May 27, 2024

Hi, for some reason i am not able to get signal filtering by argument value to work.

Reproducer

  1. start monitoring dbus with # dbus-monitor --system "arg3='done'"
  2. try to submit systemd job with for example # systemctl restart polkit
  3. check found signal

Expected result

signal time=1716466590.572778 sender=:1.0 -> destination=(null destination) serial=5066 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=JobRemoved
uint32 4996
object path "/org/freedesktop/systemd1/job/4996"
string "polkit.service"
string "done"

Actual result

None

Context:
I am developing daemon that is listening for JobRemoved signal of systemd and i would like to receive only signal related to a service i am watching. I am using dbus-python but so far i am not able to get filtering by argument to work.
Am i missing something or is it possible that there is a bug?

Environment i am using is Fedora Rawhide.
dbus-broker-36-2

Thanks for any help.

@dvdhrm
Copy link
Member

dvdhrm commented Jun 10, 2024

This looks like a bug in dbus-broker. In particular:

https:/bus1/dbus-broker/blob/main/src/bus/match.c#L425

This uses args[0] instead of args[i]. Maybe @teg can have a look at well, but I think this needs to be fixed.

@teg
Copy link
Contributor

teg commented Jun 12, 2024

Yikes, that's a bug indeed. Mea culpa!

@dvdhrm
Copy link
Member

dvdhrm commented Jul 30, 2024

Fixed via #369 and #371. Thanks a lot for the report!

@dvdhrm dvdhrm closed this as completed Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants