mirror of
https://github.com/uroni/urbackup_backend.git
synced 2025-10-26 11:36:50 +00:00
Misc changes
This commit is contained in:
parent
73bc18bc39
commit
334cb15279
@ -245,6 +245,7 @@ bool DownloadfileThreaded(std::string url,std::string filename, IPipe *pipe, std
|
||||
if( csize2!="" )
|
||||
{
|
||||
chunksize=(int)hexToULong((char*)csize2.c_str() );
|
||||
chunksize=(std::max)(-1, (std::min)(1048576,chunksize) );
|
||||
while( chunksize<=(int)(tmpbuf.size()-4-csize2.size()) && chunksize>0)
|
||||
{
|
||||
out.write(&tmpbuf[4+csize2.size()], chunksize);
|
||||
@ -257,6 +258,7 @@ bool DownloadfileThreaded(std::string url,std::string filename, IPipe *pipe, std
|
||||
if( csize2!="" )
|
||||
{
|
||||
chunksize=hexToULong((char*)csize2.c_str() );
|
||||
chunksize=(std::max)(-1, (std::min)(1048576,chunksize) );
|
||||
}
|
||||
else
|
||||
chunksize=-1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user