summaryrefslogtreecommitdiff
path: root/pjsip/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2012-04-11 09:41:25 +0000
committerBenny Prijono <bennylp@teluu.com>2012-04-11 09:41:25 +0000
commit78ce50707aff32caa195be402721001d51dba2c0 (patch)
tree10e27f86a863393c2281ba6e1005c833405a6856 /pjsip/include
parentc4cf3952e436987946dd8d7626b9cf0c4d75656a (diff)
More re #1481: Destroying the regc may lead to dangling binding in the register, so instead of destroying the regc, instruct it to release the transport instead
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@4037 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r--pjsip/include/pjsip-ua/sip_regc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/pjsip/include/pjsip-ua/sip_regc.h b/pjsip/include/pjsip-ua/sip_regc.h
index 4ef4bbaa..c2aec0c8 100644
--- a/pjsip/include/pjsip-ua/sip_regc.h
+++ b/pjsip/include/pjsip-ua/sip_regc.h
@@ -265,6 +265,19 @@ PJ_DECL(pj_status_t) pjsip_regc_set_route_set(pjsip_regc *regc,
PJ_DECL(pj_status_t) pjsip_regc_set_transport(pjsip_regc *regc,
const pjsip_tpselector *sel);
+/**
+ * Release the reference to current transport being used by the regc, if any.
+ * The regc keeps the reference to the last transport being used in order
+ * to prevent it from being destroyed. In some situation however, such as
+ * when the transport is disconnected, it is necessary to instruct the
+ * regc to release this reference so that the transport can be destroyed.
+ * See https://trac.pjsip.org/repos/ticket/1481 for background info.
+ *
+ * @param regc The client registration instance.
+ *
+ * @return PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_release_transport(pjsip_regc *regc);
/**
* Add headers to be added to outgoing REGISTER requests.