threaded DNS: Remove an unneeded function

This inlines the function into its only caller.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter
2012-01-25 21:18:57 +01:00
parent 94c7b04245
commit 233897b3a8
2 changed files with 3 additions and 4 deletions

View File

@@ -131,7 +131,6 @@ private:
};
void StartTDNSThread(TDNSTask* task, bool bBind);
void SetTDNSThreadFinished(TDNSTask* task, bool bBind, addrinfo* aiResult);
void TryToFinishTDNSTask(TDNSTask* task);
void RetrieveTDNSResult();
static void* TDNSThread(void* argument);
#endif

View File

@@ -129,13 +129,13 @@ void CSockManager::SetTDNSThreadFinished(TDNSTask* task, bool bBind, addrinfo* a
task->aiTarget = aiResult;
task->bDoneTarget = true;
}
TryToFinishTDNSTask(task);
}
void CSockManager::TryToFinishTDNSTask(TDNSTask* task) {
// Now that something is done, check if everything we needed is done
if (!task->bDoneBind || !task->bDoneTarget) {
return;
}
// All needed DNS is done, now collect the results
addrinfo* aiTarget = NULL;
addrinfo* aiBind = NULL;