summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-09-20 18:36:15 -0500
committerRichard Mudgett <rmudgett@digium.com>2017-10-09 12:53:13 -0500
commitd388c18abff78b21548523bb706c5c911eb2a883 (patch)
tree71ff9b1adf51057dc2fc0bdbdb72f84022ad2754 /include
parent39b68a41f7238049f8df0b930f8e03a4df0f79c2 (diff)
res_pjsip_registrar.c: Update remove_existing AOR contact handling.
When "rewrite_contact" is enabled, the "max_contacts" count option can block re-registrations because the source port from the endpoint can be random. When the re-registration is blocked, the endpoint may give up re-registering and require manual intervention. * The "remove_existing" option now allows a registration to succeed by displacing any existing contacts that now exceed the "max_contacts" count. Any removed contacts are the next to expire. The behaviour change is beneficial when "rewrite_contact" is enabled and "max_contacts" is greater than one. The removed contact is likely the old contact created by "rewrite_contact" that the device is refreshing. ASTERISK-27192 Change-Id: I64c107a10b70db1697d17136051ae6bf22b5314b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/vector.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asterisk/vector.h b/include/asterisk/vector.h
index 945a7875f..8270e25a9 100644
--- a/include/asterisk/vector.h
+++ b/include/asterisk/vector.h
@@ -548,6 +548,14 @@ AST_VECTOR(ast_vector_int, int);
#define AST_VECTOR_SIZE(vec) (vec)->current
/*!
+ * \brief Get the maximum number of elements the vector can currently hold.
+ *
+ * \param vec Vector to query.
+ * \return Maximum number of elements the vector can currently hold.
+ */
+#define AST_VECTOR_MAX_SIZE(vec) (vec)->max
+
+/*!
* \brief Reset vector.
*
* \param vec Vector to reset.