-
Notifications
You must be signed in to change notification settings - Fork 19
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
UnixFD: Handle DBus signals with Unix file descriptors #102
Conversation
Move all functions and classes related to the UnixFD support to dasbus.unix.
The `GLibClientUnix` class should be able to handle the result of a client call that might contain Unix file descriptors. The `ClientObjectHandler` class shouldn't support anything related to that.
* Remove the `variant_replace_fdlist_indices_with_handles` function. * Remove the `variant_replace_handles_with_fdlist_indices` function. * Use the `acquire_fds` and `restore_fds` functions instead.
Clean up unit tests for the `UnixFDSwap` class and the related code.
Clean up the implementation of the existing tests and write new ones.
Set and get a property with Unix file descriptors.
GLib doesn't seem to support Unix file descriptors in signals. Swap Unix file descriptors with indexes into a list of Unix file descriptors, but emit just the indexes. Log a warning to inform users about the limited support.
acb3078
to
7736e51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as far as I can tell. :)
Also noticed a probable typo. :)
|
||
|
||
def variant_replace_fdlist_indices_with_handles(v, fdlist): | ||
"""Given a varaint and an fdlist, find any 'h' handle instances |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a typo or is some DBus type called like that ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a typo, but the string was eventually removed in following commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you!
GLib doesn't seem to support Unix file descriptors in signals. Swap Unix
file descriptors with indexes into a list of Unix file descriptors, but emit
just the indexes. Log a warning to inform users about the limited support.
Depends on: #101