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

dnfdaemon: Correct D-Bus signal argument type #1679

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

mcrha
Copy link
Contributor

@mcrha mcrha commented Sep 6, 2024

See the two commits for more info.

Resolves: #1646
Resolves: #1665 (comment)

…ct_path argument

The interface is defined as the "session_object_path" is of type "object_path",
but when setting the arguments it's passing the path as a string, which causes
a type mismatch and the client side can reject the signal.

Store the object path as an sdbus::ObjectPath in the Session class to
have correct types in the signal emission.

Closes rpm-software-management#1646
…::cancel method

Both the arguments are output arguments, to be read by client, not
to be set by the client, thus mark them as such.

Related to rpm-software-management#1665 (comment)
@mcrha mcrha force-pushed the wip/interface-arg-types branch from 5b6b217 to e0f7b91 Compare September 6, 2024 08:21
mcrha referenced this pull request Sep 6, 2024
It looks like the server is sending session_object_path argument as a
string, although it is declared as "object path" type.
Changing to strings to resolve runtime warnings on the client side.
See #1646 for
details.
Copy link
Member

@m-blaha m-blaha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@m-blaha m-blaha added this pull request to the merge queue Sep 6, 2024
Merged via the queue into rpm-software-management:main with commit d7101b3 Sep 6, 2024
12 of 20 checks passed
kontura added a commit to kontura/dnf5 that referenced this pull request Sep 19, 2024
Since rpm-software-management#1679
`get_session_object_path()` returns `sdbus::ObjectPath` we cannot
compare it to `std::string`. Convert both to `sdbus::ObjectPath`.

This was causing the check `signature_valid(sdbus::Signal &)` to return
`false`, the client callback ended and the server kept waiting for result
of the `key_import` userconfirm.
kontura added a commit to kontura/dnf5 that referenced this pull request Sep 20, 2024
Since rpm-software-management#1679
`sdbus::ObjectPath` is send over to the client not std::string.

This was causing the check `signature_valid(sdbus::Signal &)` to crash,
the client callback ended and the server kept waiting for result
of the `key_import` userconfirm.
github-merge-queue bot pushed a commit that referenced this pull request Sep 20, 2024
Since #1679
`sdbus::ObjectPath` is send over to the client not std::string.

This was causing the check `signature_valid(sdbus::Signal &)` to crash,
the client callback ended and the server kept waiting for result
of the `key_import` userconfirm.
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 this pull request may close these issues.

dnf5daemon: Mismatch in signals argument type
2 participants