via: 155571d841effd7411686952da0d679af34bc0ac (commit)
from: e1c17cffe0bfbf7c50a02acc9384679ef283a96b (commit)
= COMMIT LOG ===========================================================
committer: Moises Silva
comments:
freetdm: fix ftdm error mapping to unix-style errors
diff --git a/libs/freetdm/src/include/ftdm_declare.h b/libs/freetdm/src/include/ftdm_declare.h
index 88a7693..b443f2d 100644
--- a/libs/freetdm/src/include/ftdm_declare.h
+++ b/libs/freetdm/src/include/ftdm_declare.h
@@ -178,18 +178,20 @@ typedef int ftdm_socket_t;
/*! \brief FreeTDM APIs possible return codes */
typedef enum {
FTDM_SUCCESS, /*!< Success */
- FTDM_FAIL, /*!< Failure, generic error return code, use ftdm_channel_get_last_error or ftdm_span_get_last_error for details */
- FTDM_MEMERR, /*!< Memory error, most likely allocation failure */
+ FTDM_FAIL, /*!< Failure, generic error return code when no more specific return code can be used */
+
+ FTDM_MEMERR, /*!< Allocation failure */
+ FTDM_ENOMEM = FTDM_MEMERR,
+
FTDM_TIMEOUT, /*!< Operation timed out (ie: polling on a device)*/
+ FTDM_ETIMEDOUT = FTDM_TIMEOUT,
+
FTDM_NOTIMPL, /*!< Operation not implemented */
+ FTDM_ENOSYS = FTDM_NOTIMPL, /*!< The function is not implemented */
+
FTDM_BREAK, /*!< Request the caller to perform a break (context-dependant, ie: stop getting DNIS/ANI) */
/*!< Any new return codes should try to mimc unix style error codes, no need to reinvent */
- /* Remapping some of the codes that were before */
- FTDM_ENOMEM = FTDM_MEMERR, /*!< Memory error */
- FTDM_ETIMEDOUT = FTDM_TIMEOUT, /*!< Operation timedout */
- FTDM_ENOSYS = FTDM_NOTIMPL, /*!< The function is not implemented */
-
FTDM_EINVAL, /*!< Invalid argument */
FTDM_ECANCELED, /*!< Operation cancelled */
FTDM_EBUSY, /*!< Device busy */
Summary of changes: libs/freetdm/src/include/ftdm_declare.h | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email
For more info, see http://blog.chomperstomp.com/?p=630
--
FreeSWITCH Source