summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2013-09-26 18:51:54 +0000
committerKevin Harwell <kharwell@digium.com>2013-09-26 18:51:54 +0000
commit103ebcf807cb9050ad3653c606cb8cf07c36850f (patch)
tree0b2385b16e999ff3dd5f9feeaa6e21c41f0f153a /include/asterisk
parent1df1ebdc379d46545c35f1abdff6b100f0c4bcac (diff)
pjsip: race condition in registrar
While handling a registration request a race condition could occur if/when two+ clients registered at the same time. This happened when one request obtained a copy of the current contacts for an AOR and another request did the same before the first request updated. Thus the second would update and overwrite the first (or vice-versa depending on which actually updated first). In the case of it being the same contact two "add" events would be raised. pjsip registration handling is now serialized to alleviate this issue. (closes issue AST-1213) Reported by: John Bigelow Review: https://reviewboard.asterisk.org/r/2860/ ........ Merged revisions 399897 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/res_pjsip.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h
index 354e8a7a5..9ba2e90c7 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -1478,6 +1478,24 @@ void ast_sip_report_auth_success(struct ast_sip_endpoint *endpoint, pjsip_rx_dat
*/
void ast_sip_report_auth_challenge_sent(struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata, pjsip_tx_data *tdata);
+/*!
+ * \brief Send a security event notification for when a request is not supported
+ *
+ * \param endpoint Pointer to the endpoint in use
+ * \param rdata Received message
+ * \param req_type the type of request
+ */
+void ast_sip_report_req_no_support(struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata,
+ const char* req_type);
+
+/*!
+ * \brief Send a security event notification for when a memory limit is hit.
+ *
+ * \param endpoint Pointer to the endpoint in use
+ * \param rdata Received message
+ */
+void ast_sip_report_mem_limit(struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata);
+
void ast_sip_initialize_global_headers(void);
void ast_sip_destroy_global_headers(void);