aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-28 16:28:26 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-28 16:28:26 +0000
commit5525846c14b619c422b4b1373a2b600438de9c96 (patch)
tree7c4fc12b586885d85fc9342e07f133056bb5f621 /include
parent37e6efff7b51c5ac5e75a6c29db2470cf67d0911 (diff)
(closes issue #7852)
Reported by: nic_bellamy Patches: 2006-10-03_svn_44249_voicemail_lockmode_v3.patch uploaded by nic_bellamy (license 213) Add support for configurable file locking methods. The default is "lockfile", which is the old behavior. There is an additional option, "flock", which is intended for use in situations where the lockfile method will not work, such as with SMB/CIFS mounts. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81233 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/app.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asterisk/app.h b/include/asterisk/app.h
index 4bee632b9..6e5d993c3 100644
--- a/include/asterisk/app.h
+++ b/include/asterisk/app.h
@@ -202,6 +202,18 @@ enum AST_LOCK_RESULT {
AST_LOCK_FAILURE = -3,
};
+/*! \brief Type of locking to use in ast_lock_path / ast_unlock_path */
+enum AST_LOCK_TYPE {
+ AST_LOCK_TYPE_LOCKFILE = 0,
+ AST_LOCK_TYPE_FLOCK = 1,
+};
+
+/*!
+ * \brief Set the type of locks used by ast_lock_path()
+ * \param type the locking type to use
+ */
+void ast_set_lock_type(enum AST_LOCK_TYPE type);
+
/*!
* \brief Lock a filesystem path.
* \param path the path to be locked