Commit c6c90c8b authored by Lucas Biaggi's avatar Lucas Biaggi
Browse files

Fix typo which could cause segment fault

- (firewalld/queryrulesfirewalldjob) Fix typo
- (firewalld/firewalldjob) emitResult when error happens earlier
parent f99c2b2a
Pipeline #135458 passed with stage
in 47 seconds
......@@ -70,6 +70,7 @@ T FirewalldJob::connectCall(QDBusPendingCallWatcher *watcher)
setErrorText(reply.error().message());
setError(DBUSFIREWALLDDERROR);
qCDebug(FirewallDJobDebug) << "job error message: " << errorString();
emitResult();
}
return reply.value();
}
......
......@@ -15,10 +15,13 @@ QueryRulesFirewalldJob::QueryRulesFirewalldJob()
connect(m_direct, &KJob::result, this, [this](void) {
m_directFinished = true;
if(m_direct->error()) {
qCDebug(FirewallDJobDebug) << "Query Job Failed: " << m_direct->error() << m_direct->errorString();
return;
if (m_direct->error()) {
setError(m_direct->error());
setErrorText(m_direct->errorString());
emitResult();
return;
}
m_replyDirect = m_direct->getFirewalldreply();
if (m_simpleFinished) {
emitResult();
......@@ -28,9 +31,11 @@ QueryRulesFirewalldJob::QueryRulesFirewalldJob()
connect(m_simple, &KJob::result, this, [this](void) {
m_simpleFinished = true;
if(m_direct->error()) {
qCDebug(FirewallDJobDebug) << "Query Job Failed: " << m_direct->error() << m_direct->errorString();
return;
if (m_simple->error()) {
setError(m_simple->error());
setErrorText(m_simple->errorString());
emitResult();
return;
}
m_replyServices = m_simple->getServices();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment