summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsua-lib/pjsua_core.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-10-20 13:56:26 +0000
committerBenny Prijono <bennylp@teluu.com>2009-10-20 13:56:26 +0000
commit89547e9f9d2eff5aa4dd7bbd212ebd7cee8b4e96 (patch)
tree521151a3f1724381ebf27dffd0f24ba251bc76af /pjsip/src/pjsua-lib/pjsua_core.c
parentc1e884baaed1d9990ede66182d4d535c7b855779 (diff)
Initial commit for ticket #937: Revamping of presence management to make it more efficient
Presence enhancements: - finer grained buddy lock object, instead of using global PJSUA-LIB's mutex - individual resubscription timer for buddies and also add random delay interval so that resubscriptions don't happen simultaneously (may hog processing and bandwidth). - in general reduced the use of global PJSUA-LIB's mutex for more efficiency - added last termination code in buddy info - use the RPID note's text for buddy's offline status rather than the default "offline" status, if available - resubscribe automatically on several termination causes as explained in the ticket (still untested) General enhancements: - added pjsua_schedule_timer() and pjsua_cancel_timer() APIs git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2956 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_core.c')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_core.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c
index f5e0fba4..773785ed 100644
--- a/pjsip/src/pjsua-lib/pjsua_core.c
+++ b/pjsip/src/pjsua-lib/pjsua_core.c
@@ -2318,6 +2318,23 @@ PJ_DEF(pj_status_t) pjsua_verify_sip_url(const char *c_url)
return p ? 0 : -1;
}
+/*
+ * Schedule a timer entry.
+ */
+PJ_DEF(pj_status_t) pjsua_schedule_timer( pj_timer_entry *entry,
+ const pj_time_val *delay)
+{
+ return pjsip_endpt_schedule_timer(pjsua_var.endpt, entry, delay);
+}
+
+/*
+ * Cancel the previously scheduled timer.
+ *
+ */
+PJ_DEF(void) pjsua_cancel_timer(pj_timer_entry *entry)
+{
+ pjsip_endpt_cancel_timer(pjsua_var.endpt, entry);
+}
/**
* Normalize route URI (check for ";lr" and append one if it doesn't