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

fix DBusRemote using the wrong attribute #88

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pystemd/dbuslib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ from libc.stdint cimport (
uint64_t,
)
from libc.stdlib cimport free
from libc.string cimport strdup
from libcpp cimport bool

CONTAINER_TYPES = (
Expand Down Expand Up @@ -571,10 +572,13 @@ cdef class DBusRemote(DBus):
cdef char* host

def __init__(self, char* host):
self.host = host
self.host = strdup(host)

cdef int open_dbus_bus(self):
return dbusc.sd_bus_open_system_remote(&(self.bus), self.remote)
return dbusc.sd_bus_open_system_remote(&(self.bus), self.host)

def __dealloc__(self):
free(self.host)

cdef class DBusAddress(DBus):
"DBus class that connects to custom address"
Expand Down
Loading