Skip to content
Snippets Groups Projects
Commit fa330fe8 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

dbus: stop daemon when last instance detached

+ dbusinstance: count_ can be initialized to something else than 0
causing count_ to always be incorrect
+ ring_api: check pointer for ioContext() (because a callback may
be emitted right after ioContext() is resetted causing to end
on a segfault instead exit=0)

GitLab: #861
Change-Id: If0d798aaa2ce7d65426d902868627bd701652375
parent 632ec7e3
No related branches found
No related tags found
No related merge requests found
......@@ -60,5 +60,5 @@ public:
}
private:
int_least16_t count_;
int_least16_t count_ {0};
};
......@@ -125,7 +125,8 @@ logging(const std::string& whom, const std::string& action) noexcept
void
CallbackWrapperBase::post(std::function<void()> cb)
{
jami::Manager::instance().ioContext()->post(std::move(cb));
if (auto io = jami::Manager::instance().ioContext())
io->post(std::move(cb));
}
} // namespace libjami
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment