解决HGPdtToolDb_DownloadFile返回不正确的问题

This commit is contained in:
luoliangyi 2022-12-22 09:28:15 +08:00
parent 4b1a3952c1
commit a27f35c28a
1 changed files with 9 additions and 2 deletions

View File

@ -201,11 +201,18 @@ HGResult HGPdtToolDbUserMgrImpl::Create(const HGChar* host, HGUShort port, const
HGResult HGPdtToolDbUserMgrImpl::Destroy()
{
if (NULL == m_sql || !m_deviceList.empty())
if (NULL == m_sql)
{
return HGBASE_ERR_FAIL;
}
std::list<class HGPdtToolDbDeviceImpl*>::iterator iter;
for (iter = m_deviceList.begin(); iter != m_deviceList.end(); ++iter)
{
delete (*iter);
}
m_deviceList.clear();
m_stopThread = HGTRUE;
HGBase_SetEvent(m_event);
HGBase_CloseThread(m_thread);
@ -693,7 +700,7 @@ HGResult HGPdtToolDbUserMgrImpl::DownloadFile(const HGChar* tag, const HGChar* f
{
if (readLength == fwrite(bnd.buffer, 1, bnd.buffer_length, file))
{
ret = HGBASE_ERR_OK;
res = HGBASE_ERR_OK;
}
fclose(file);