0035-r5572-svn-backport-dialog-transaction-deadlock.patch 0036-r5573-svn-backport-ua-pjsua-transaction-deadlock.patch 0037-r5576-svn-backport-session-timer-crash.patch Also removed the progress bar from wget download to stdout. ASTERISK-26905 #close Reported-by: Ross Beer Change-Id: I268fb3cf71a3bb24283ff0d24bd8b03239d81256
73 lines
2.3 KiB
Diff
73 lines
2.3 KiB
Diff
Index: pjproject/trunk/pjsip/src/pjsip-ua/sip_timer.c
|
|
===================================================================
|
|
--- a/pjsip/src/pjsip-ua/sip_timer.c (revision 5557)
|
|
+++ b/pjsip/src/pjsip-ua/sip_timer.c (revision 5576)
|
|
@@ -333,6 +333,8 @@
|
|
pjsip_tx_data *tdata = NULL;
|
|
pj_status_t status;
|
|
pj_bool_t as_refresher;
|
|
+ int entry_id;
|
|
+ char obj_name[PJ_MAX_OBJ_NAME];
|
|
|
|
pj_assert(inv);
|
|
|
|
@@ -344,7 +346,10 @@
|
|
/* Check our role */
|
|
as_refresher =
|
|
(inv->timer->refresher == TR_UAC && inv->timer->role == PJSIP_ROLE_UAC) ||
|
|
- (inv->timer->refresher == TR_UAS && inv->timer->role == PJSIP_ROLE_UAS);
|
|
+ (inv->timer->refresher == TR_UAS && inv->timer->role == PJSIP_ROLE_UAS);
|
|
+
|
|
+ entry_id = entry->id;
|
|
+ pj_ansi_strncpy(obj_name, inv->pool->obj_name, PJ_MAX_OBJ_NAME);
|
|
|
|
/* Do action based on role(refresher or refreshee).
|
|
* As refresher:
|
|
@@ -353,7 +358,7 @@
|
|
* As refreshee:
|
|
* - end session if there is no refresh request received.
|
|
*/
|
|
- if (as_refresher && (entry->id != REFRESHER_EXPIRE_TIMER_ID)) {
|
|
+ if (as_refresher && (entry_id != REFRESHER_EXPIRE_TIMER_ID)) {
|
|
pj_time_val now;
|
|
|
|
/* As refresher, reshedule the refresh request on the following:
|
|
@@ -414,7 +419,7 @@
|
|
}
|
|
|
|
pj_gettimeofday(&now);
|
|
- PJ_LOG(4, (inv->pool->obj_name,
|
|
+ PJ_LOG(4, (obj_name,
|
|
"Refreshing session after %ds (expiration period=%ds)",
|
|
(now.sec-inv->timer->last_refresh.sec),
|
|
inv->timer->setting.sess_expires));
|
|
@@ -432,7 +437,7 @@
|
|
NULL, &tdata);
|
|
|
|
pj_gettimeofday(&now);
|
|
- PJ_LOG(3, (inv->pool->obj_name,
|
|
+ PJ_LOG(3, (obj_name,
|
|
"No session %s received after %ds "
|
|
"(expiration period=%ds), stopping session now!",
|
|
(as_refresher?"refresh response":"refresh"),
|
|
@@ -451,11 +456,16 @@
|
|
status = pjsip_inv_send_msg(inv, tdata);
|
|
}
|
|
|
|
+ /*
|
|
+ * At this point, dialog might have already been destroyed,
|
|
+ * including its pool used by the invite session.
|
|
+ */
|
|
+
|
|
/* Print error message, if any */
|
|
if (status != PJ_SUCCESS) {
|
|
- PJ_PERROR(2, (inv->pool->obj_name, status,
|
|
+ PJ_PERROR(2, (obj_name, status,
|
|
"Error in %s session timer",
|
|
- ((as_refresher && entry->id != REFRESHER_EXPIRE_TIMER_ID)?
|
|
+ ((as_refresher && entry_id != REFRESHER_EXPIRE_TIMER_ID)?
|
|
"refreshing" : "terminating")));
|
|
}
|
|
}
|
|
|