mirror of
https://github.com/Kistler-Group/sdbus-cpp.git
synced 2025-07-30 10:07:16 +02:00
fix: invalid assert on event fd (#243)
This commit is contained in:
@ -73,7 +73,7 @@ Connection::~Connection()
|
|||||||
void Connection::requestName(const std::string& name)
|
void Connection::requestName(const std::string& name)
|
||||||
{
|
{
|
||||||
SDBUS_CHECK_SERVICE_NAME(name);
|
SDBUS_CHECK_SERVICE_NAME(name);
|
||||||
|
|
||||||
auto r = iface_->sd_bus_request_name(bus_.get(), name.c_str(), 0);
|
auto r = iface_->sd_bus_request_name(bus_.get(), name.c_str(), 0);
|
||||||
SDBUS_THROW_ERROR_IF(r < 0, "Failed to request bus name", -r);
|
SDBUS_THROW_ERROR_IF(r < 0, "Failed to request bus name", -r);
|
||||||
}
|
}
|
||||||
@ -423,7 +423,7 @@ bool Connection::processPendingRequest()
|
|||||||
bool Connection::waitForNextRequest()
|
bool Connection::waitForNextRequest()
|
||||||
{
|
{
|
||||||
assert(bus_ != nullptr);
|
assert(bus_ != nullptr);
|
||||||
assert(eventFd_.fd != 0);
|
assert(eventFd_.fd >= 0);
|
||||||
|
|
||||||
auto sdbusPollData = getEventLoopPollData();
|
auto sdbusPollData = getEventLoopPollData();
|
||||||
struct pollfd fds[] = {
|
struct pollfd fds[] = {
|
||||||
|
@ -134,7 +134,7 @@ namespace sdbus::internal {
|
|||||||
{
|
{
|
||||||
EventFd();
|
EventFd();
|
||||||
~EventFd();
|
~EventFd();
|
||||||
int fd;
|
int fd{-1};
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user