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: https://svn.pjsip.org/repos/pjproject/trunk@734 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/src/pjsua-lib/pjsua_pres.c b/pjsip/src/pjsua-lib/pjsua_pres.c
index b3205cc..78f913d 100644
--- a/pjsip/src/pjsua-lib/pjsua_pres.c
+++ b/pjsip/src/pjsua-lib/pjsua_pres.c
@@ -978,6 +978,16 @@
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 @@
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);