summaryrefslogtreecommitdiff
path: root/include/asterisk/res_pjproject.h
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-01-13 16:49:22 -0600
committerRichard Mudgett <rmudgett@digium.com>2016-01-21 12:47:12 -0600
commit5615db3714fbc8ca14e9c57921d3f05185f197f0 (patch)
tree4d48cbe9c10b7b140fa6699da45d69c4352b23ca /include/asterisk/res_pjproject.h
parente66021d2ca5e00c60db682ac9091f44781666455 (diff)
res_pjsip: Add CLI "pjsip dump endpt [details]"
Dump the res_pjsip endpt internals. In non-developer mode we will not document or make easily accessible the "details" option even though it is still available. The user has to know it exists to use it. Presumably they would also be aware of the potential crash warning below. Warning: PJPROJECT documents that the function used by this CLI command may cause a crash when asking for details because it tries to access all active memory pools. Change-Id: If2d98a3641c9873364d1daaad971376311aef3cb
Diffstat (limited to 'include/asterisk/res_pjproject.h')
-rw-r--r--include/asterisk/res_pjproject.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/include/asterisk/res_pjproject.h b/include/asterisk/res_pjproject.h
index 2095caed2..8828b340c 100644
--- a/include/asterisk/res_pjproject.h
+++ b/include/asterisk/res_pjproject.h
@@ -19,6 +19,14 @@
#ifndef _RES_PJPROJECT_H
#define _RES_PJPROJECT_H
+/*! \brief Determines whether the res_pjproject module is loaded */
+#define CHECK_PJPROJECT_MODULE_LOADED() \
+ do { \
+ if (!ast_module_check("res_pjproject.so")) { \
+ return AST_MODULE_LOAD_DECLINE; \
+ } \
+ } while(0)
+
/*!
* \brief Retrieve a pjproject build option
*
@@ -43,7 +51,33 @@
* \endcode
*
*/
-int ast_pjproject_get_buildopt(char *option, char *format_string, ...) __attribute__((format(scanf, 2,3)));
+int ast_pjproject_get_buildopt(char *option, char *format_string, ...) __attribute__((format(scanf, 2, 3)));
+
+/*!
+ * \brief Begin PJPROJECT log interception for CLI output.
+ * \since 13.8.0
+ *
+ * \param fd CLI file descriptior to send intercepted output.
+ *
+ * \note ast_pjproject_log_intercept_begin() and
+ * ast_pjproject_log_intercept_end() must always be called
+ * in pairs.
+ *
+ * \return Nothing
+ */
+void ast_pjproject_log_intercept_begin(int fd);
+
+/*!
+ * \brief End PJPROJECT log interception for CLI output.
+ * \since 13.8.0
+ *
+ * \note ast_pjproject_log_intercept_begin() and
+ * ast_pjproject_log_intercept_end() must always be called
+ * in pairs.
+ *
+ * \return Nothing
+ */
+void ast_pjproject_log_intercept_end(void);
/*!
* \brief Increment the res_pjproject reference count.