errorStr += strerror(errno);
errorStr += "'";
printfd(__FILE__, "FILES_STORE::WriteDetailStat - fprintf failed. Message: '%s'\n", strerror(errno));
+ fclose(statFile);
return -1;
}
#else
errorStr += strerror(errno);
errorStr += "'";
printfd(__FILE__, "FILES_STORE::WriteDetailStat - fprintf failed. Message: '%s'\n", strerror(errno));
+ fclose(statFile);
return -1;
}
#endif
#ifndef FILE_STORE_H
#define FILE_STORE_H
-#include <string>
#include <sys/types.h>
+#include <string>
+
#include "base_settings.h"
#include "base_store.h"
#include "conffiles.h"
int ParseGroup(const vector<PARAM_VALUE> & moduleParams, const string & group, uid_t * uid);
int ParseMode(const vector<PARAM_VALUE> & moduleParams, const string & modeStr, mode_t * mode);
int ParseYesNo(const string & value, bool * val);
+
string errorStr;
string workDir;
virtual int DelService(const string &) const {return 0;};
//virtual BASE_SETTINGS * GetStoreSettings();
- virtual void SetSettings(const MODULE_SETTINGS & s);
- virtual int ParseSettings();
+ virtual void SetSettings(const MODULE_SETTINGS & s);
+ virtual int ParseSettings();
virtual const string & GetVersion() const;
private:
virtual int WriteLogString(const string & str, const string & login) const;
virtual int WriteLog2String(const string & str, const string & login) const;
- int RemoveDir(const char * path) const;
- int GetFilesList(vector<string> * filesList, const string & directory, mode_t mode, const string & ext) const;
- mutable string errorStr;
- string version;
- FILES_STORE_SETTINGS storeSettings;
- MODULE_SETTINGS settings;
+ int RemoveDir(const char * path) const;
+ int GetFilesList(vector<string> * filesList, const string & directory, mode_t mode, const string & ext) const;
+
+ mutable string errorStr;
+ string version;
+ FILES_STORE_SETTINGS storeSettings;
+ MODULE_SETTINGS settings;
mutable pthread_mutex_t mutex;
};
//-----------------------------------------------------------------------------