Improvements from anna fork
[anna.git] / example / diameter / launcher / MyCounterRecorder.cpp
index dd32652..fd29422 100644 (file)
@@ -34,7 +34,7 @@ void MyCounterRecorder::open() throw(anna::RuntimeException) {
          anna::Logger::debug(msg, ANNA_FILE_LOCATION);
        );
 
-       if((a_stream = ::open(a_fileName.c_str(), O_WRONLY | O_CREAT, S_IWUSR)) == -1)
+       if((a_stream = ::open(a_fileName.c_str(), O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH /*0644*/)) == -1)
          throw RuntimeException(anna::functions::asString("Error opening file '%s'; errno = %d", a_fileName.c_str(), errno), ANNA_FILE_LOCATION);
 
        sprintf(str, "%04d-%02d-%02d %02d:%02d|%04d-%02d-%02d %02d:%02d",
@@ -61,7 +61,7 @@ void MyCounterRecorder::close() throw() {
          a_stream = -1;
        }
 
-chmod(a_fileName.c_str(), S_IWUSR | S_IRUSR);
+//chmod(a_fileName.c_str(), S_IWUSR | S_IRUSR);
 a_previousTime = ::time(NULL);
 }