summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsua-lib/pjsua_pres.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-09-22 16:55:42 +0000
committerBenny Prijono <bennylp@teluu.com>2006-09-22 16:55:42 +0000
commite7e08fc3b6b09d3dba5dce0307dfc0dbad5f9aef (patch)
tree28e16b92c48230f140485586c3267db86188b372 /pjsip/src/pjsua-lib/pjsua_pres.c
parent8f0078e1663ab2d5d6b25a0d5745f5c14ed9ab18 (diff)
Fixed few bugs that seem to have been introduced by new dialog
locking algorithm: - Fixed crash in PJSUA-API when initiating client subscription - Fixed another crash in PJSUA-API when hanging-up call Also fixed SDP negotiator: - add a=inactive when rejecting media line Also increase maximum log size from 1500 to 2000 since some SIP packet is quite large. A little bit of Warning: ** THIS MAY AFFECT APPLICATION'S STACK USAGE ** git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@734 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_pres.c')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_pres.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_pres.c b/pjsip/src/pjsua-lib/pjsua_pres.c
index b3205cc5..78f913d1 100644
--- a/pjsip/src/pjsua-lib/pjsua_pres.c
+++ b/pjsip/src/pjsua-lib/pjsua_pres.c
@@ -978,6 +978,16 @@ static void subscribe_buddy_presence(unsigned index)
return;
}
+ status = pjsip_pres_create_uac( dlg, &pres_callback,
+ PJSIP_EVSUB_NO_EVENT_ID, &buddy->sub);
+ if (status != PJ_SUCCESS) {
+ pjsua_var.buddy[index].sub = NULL;
+ pjsua_perror(THIS_FILE, "Unable to create presence client",
+ status);
+ pjsip_dlg_terminate(dlg);
+ return;
+ }
+
/* Set route-set */
if (!pj_list_empty(&acc->route_set)) {
pjsip_dlg_set_route_set(dlg, &acc->route_set);
@@ -989,16 +999,6 @@ static void subscribe_buddy_presence(unsigned index)
acc->cred_cnt, acc->cred);
}
- status = pjsip_pres_create_uac( dlg, &pres_callback,
- PJSIP_EVSUB_NO_EVENT_ID, &buddy->sub);
- if (status != PJ_SUCCESS) {
- pjsua_var.buddy[index].sub = NULL;
- pjsua_perror(THIS_FILE, "Unable to create presence client",
- status);
- pjsip_dlg_terminate(dlg);
- return;
- }
-
pjsip_evsub_set_mod_data(buddy->sub, pjsua_var.mod.id, buddy);
status = pjsip_pres_initiate(buddy->sub, -1, &tdata);