Skip to content
Snippets Groups Projects
Commit a47e9bd9 authored by Vadim ProductEngine's avatar Vadim ProductEngine
Browse files

EXP-1525 FIXED Potential fix for a crash at shutdown: added some error...

EXP-1525 FIXED Potential fix for a crash at shutdown: added some error handling to saving inventory cache.
parent c4a08e6c
No related branches found
No related tags found
No related merge requests found
...@@ -1364,11 +1364,21 @@ BOOL gzip_file(const std::string& srcfile, const std::string& dstfile) ...@@ -1364,11 +1364,21 @@ BOOL gzip_file(const std::string& srcfile, const std::string& dstfile)
src = LLFile::fopen(srcfile, "rb"); /* Flawfinder: ignore */ src = LLFile::fopen(srcfile, "rb"); /* Flawfinder: ignore */
if (! src) goto err; if (! src) goto err;
do while ((bytes = (S32)fread(buffer, sizeof(U8), COMPRESS_BUFFER_SIZE, src)) > 0)
{ {
bytes = (S32)fread(buffer, sizeof(U8), COMPRESS_BUFFER_SIZE,src); if (gzwrite(dst, buffer, bytes) <= 0)
gzwrite(dst, buffer, bytes); {
} while(feof(src) == 0); llwarns << "gzwrite failed: " << gzerror(dst, NULL) << llendl;
goto err;
}
}
if (ferror(src))
{
llwarns << "Error reading " << srcfile << llendl;
goto err;
}
gzclose(dst); gzclose(dst);
dst = NULL; dst = NULL;
#if LL_WINDOWS #if LL_WINDOWS
......
...@@ -64,6 +64,7 @@ class LLInventoryCollectFunctor; ...@@ -64,6 +64,7 @@ class LLInventoryCollectFunctor;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInventoryModel class LLInventoryModel
{ {
LOG_CLASS(LLInventoryModel);
public: public:
friend class LLInventoryModelFetchDescendentsResponder; friend class LLInventoryModelFetchDescendentsResponder;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment