mirror of
https://github.com/znc/znc.git
synced 2026-07-13 21:31:27 +02:00
Remove CLockFile and let CFile do its job
This shouldn't contain any major behaviour change, but there are some minor ones. Also, the API for a shared lock wasn't used and thus is dropped. Thanks to cnu for this idea. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1337 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -116,6 +116,10 @@ public:
|
||||
void Close();
|
||||
void ClearBuffer();
|
||||
|
||||
bool TryExLock(const CString& sLockFile, int iFlags = O_RDONLY);
|
||||
bool TryExLock();
|
||||
bool UnLock();
|
||||
|
||||
bool IsOpen() const;
|
||||
CString GetLongName() const;
|
||||
CString GetShortName() const;
|
||||
@@ -123,6 +127,9 @@ public:
|
||||
void SetFD(int iFD);
|
||||
|
||||
private:
|
||||
// flock() wrapper
|
||||
bool Lock(int iOperation);
|
||||
|
||||
CString m_sBuffer;
|
||||
int m_iFD;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user