aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llcommon/llfile.cpp8
-rw-r--r--linden/indra/llcommon/llfile.h6
-rw-r--r--linden/indra/llcommon/llversionviewer.h2
3 files changed, 11 insertions, 5 deletions
diff --git a/linden/indra/llcommon/llfile.cpp b/linden/indra/llcommon/llfile.cpp
index 6ccf6ac..d551f28 100644
--- a/linden/indra/llcommon/llfile.cpp
+++ b/linden/indra/llcommon/llfile.cpp
@@ -266,6 +266,7 @@ void llofstream::open(const char* _Filename, /* Flawfinder: ignore */
266 } 266 }
267 llassert(_Filebuffer==NULL); 267 llassert(_Filebuffer==NULL);
268 _Filebuffer = new _Myfb(filep); 268 _Filebuffer = new _Myfb(filep);
269 _ShouldClose = true;
269 _Myios::init(_Filebuffer); 270 _Myios::init(_Filebuffer);
270} 271}
271 272
@@ -279,14 +280,17 @@ void llofstream::close()
279llofstream::llofstream(const char *_Filename, 280llofstream::llofstream(const char *_Filename,
280 std::ios_base::openmode _Mode, 281 std::ios_base::openmode _Mode,
281 int _Prot) 282 int _Prot)
282 : std::basic_ostream<char,std::char_traits < char > >(NULL,true),_Filebuffer(NULL) 283 : std::basic_ostream<char,std::char_traits < char > >(NULL,true),_Filebuffer(NULL),_ShouldClose(false)
283{ // construct with named file and specified mode 284{ // construct with named file and specified mode
284 open(_Filename, _Mode , _Prot); /* Flawfinder: ignore */ 285 open(_Filename, _Mode , _Prot); /* Flawfinder: ignore */
285} 286}
286 287
287llofstream::~llofstream() 288llofstream::~llofstream()
288{ // destroy the object 289{ // destroy the object
289 close(); 290 if (_ShouldClose)
291 {
292 close();
293 }
290 delete _Filebuffer; 294 delete _Filebuffer;
291} 295}
292 296
diff --git a/linden/indra/llcommon/llfile.h b/linden/indra/llcommon/llfile.h
index 2650775..d449ec9 100644
--- a/linden/indra/llcommon/llfile.h
+++ b/linden/indra/llcommon/llfile.h
@@ -127,7 +127,7 @@ public:
127 typedef std::basic_ios<char,std::char_traits < char > > _Myios; 127 typedef std::basic_ios<char,std::char_traits < char > > _Myios;
128 128
129 llofstream() 129 llofstream()
130 : std::basic_ostream<char,std::char_traits < char > >(NULL,true),_Filebuffer(NULL) 130 : std::basic_ostream<char,std::char_traits < char > >(NULL,true),_Filebuffer(NULL),_ShouldClose(false)
131 { // construct unopened 131 { // construct unopened
132 } 132 }
133 133
@@ -138,7 +138,8 @@ public:
138 138
139 explicit llofstream(_Filet *_File) 139 explicit llofstream(_Filet *_File)
140 : std::basic_ostream<char,std::char_traits < char > >(NULL,true), 140 : std::basic_ostream<char,std::char_traits < char > >(NULL,true),
141 _Filebuffer(new _Myfb(_File))//_File) 141 _Filebuffer(new _Myfb(_File)),//_File)
142 _ShouldClose(false)
142 { // construct with specified C stream 143 { // construct with specified C stream
143 } 144 }
144 145
@@ -157,6 +158,7 @@ public:
157 158
158private: 159private:
159 _Myfb *_Filebuffer; // the file buffer 160 _Myfb *_Filebuffer; // the file buffer
161 bool _ShouldClose;
160}; 162};
161 163
162 164
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h
index c1e6778..998ea9e 100644
--- a/linden/indra/llcommon/llversionviewer.h
+++ b/linden/indra/llcommon/llversionviewer.h
@@ -35,7 +35,7 @@
35const S32 LL_VERSION_MAJOR = 1; 35const S32 LL_VERSION_MAJOR = 1;
36const S32 LL_VERSION_MINOR = 19; 36const S32 LL_VERSION_MINOR = 19;
37const S32 LL_VERSION_PATCH = 1; 37const S32 LL_VERSION_PATCH = 1;
38const S32 LL_VERSION_BUILD = 0; 38const S32 LL_VERSION_BUILD = 1;
39 39
40const char * const LL_CHANNEL = "Second Life Release"; 40const char * const LL_CHANNEL = "Second Life Release";
41 41