Skip to content

Commit

Permalink
Fix comparison when checking signals object_path
Browse files Browse the repository at this point in the history
Since #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.
  • Loading branch information
kontura committed Sep 19, 2024
1 parent 76fef26 commit 5bafca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dnf5daemon-client/callbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace dnfdaemon::client {

bool DbusCallback::signature_valid(sdbus::Signal & signal) {
// check that signal is emitted by the correct session object
std::string object_path;
sdbus::ObjectPath object_path;
signal >> object_path;
return object_path == context.get_session_object_path();
}
Expand Down

0 comments on commit 5bafca1

Please sign in to comment.