X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FMyCounterRecorder.cpp;h=fd29422a634d592da9f602c11d2bda738b0d73b2;hb=080dc0740d8b02011dee032f5d44eeb5f2ffe23f;hp=4f62f728118f3c861bd69d3b15d28f46694520eb;hpb=752438861433c3789eb1b0d9f2c15e15037595e6;p=anna.git diff --git a/example/diameter/launcher/MyCounterRecorder.cpp b/example/diameter/launcher/MyCounterRecorder.cpp index 4f62f72..fd29422 100644 --- a/example/diameter/launcher/MyCounterRecorder.cpp +++ b/example/diameter/launcher/MyCounterRecorder.cpp @@ -7,7 +7,7 @@ // Process -#include "MyCounterRecorder.hpp" +#include MyCounterRecorder::MyCounterRecorder(const std::string &fnp) : a_stream(-1), a_fileNamePrefix(fnp) { @@ -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); }