qpulse: properly deref requested operation objects
This commit is contained in:
parent
ce5b1e52d3
commit
0cda1431ec
18
qpulse.cpp
18
qpulse.cpp
@ -27,18 +27,28 @@ pa_context_state_t QPulse::ConnectionState()
|
||||
return pa_context_get_state(c);
|
||||
}
|
||||
|
||||
void QPulse::RequestServerInfo()
|
||||
bool QPulse::RequestServerInfo()
|
||||
{
|
||||
//ThreadedMainLoopLock lock(ml);
|
||||
|
||||
pa_context_get_server_info(c, &QPulse::onGotServerInfoSt, this);
|
||||
pa_operation* o = pa_context_get_server_info(c, &QPulse::onGotServerInfoSt, this);
|
||||
if (! o) {
|
||||
return false;
|
||||
}
|
||||
|
||||
pa_operation_unref(o);
|
||||
}
|
||||
|
||||
void QPulse::RequestCardInfo()
|
||||
bool QPulse::RequestCardInfo()
|
||||
{
|
||||
//ThreadedMainLoopLock lock(ml);
|
||||
|
||||
pa_context_get_card_info_list(c, &QPulse::onGotCardInfoListSt, this);
|
||||
pa_operation* o = pa_context_get_card_info_list(c, &QPulse::onGotCardInfoListSt, this);
|
||||
if (! o) {
|
||||
return false;
|
||||
}
|
||||
|
||||
pa_operation_unref(o);
|
||||
}
|
||||
|
||||
void QPulse::onGotCardInfoListSt(pa_context*, const pa_card_info *i, int eol, void *userdata)
|
||||
|
Loading…
Reference in New Issue
Block a user