summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-06-25 13:05:59 +0000
committerBenny Prijono <bennylp@teluu.com>2009-06-25 13:05:59 +0000
commit6f42f3125f06806f23ed87a0bb8ba91cfdcf6854 (patch)
treedd6bafa50e73fdcced4b942e3dedc1bb8a5c1b0f
parentd1db8d7827f6895ec197cb899bc07fc32bb8628b (diff)
Ticket #790: Buddy callback is still called even after buddy has been deleted (thanks Robert Cichielo for the report)
- backported changes from #789 git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.0@2812 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/src/pjsua-lib/pjsua_pres.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_pres.c b/pjsip/src/pjsua-lib/pjsua_pres.c
index 2eb78230..d619dd47 100644
--- a/pjsip/src/pjsua-lib/pjsua_pres.c
+++ b/pjsip/src/pjsua-lib/pjsua_pres.c
@@ -389,6 +389,12 @@ PJ_DEF(pj_status_t) pjsua_buddy_del(pjsua_buddy_id buddy_id)
PJSUA_LOCK();
+ /* Not interested with further events for this buddy */
+ if (pjsua_var.buddy[buddy_id].sub) {
+ pjsip_evsub_set_mod_data(pjsua_var.buddy[buddy_id].sub,
+ pjsua_var.mod.id, NULL);
+ }
+
/* Remove buddy */
pjsua_var.buddy[buddy_id].uri.slen = 0;
pjsua_var.buddy_cnt--;