解决HGPdtToolDb_DownloadFile返回不正确的问题
This commit is contained in:
parent
4b1a3952c1
commit
a27f35c28a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue