From: Automerge script Date: Thu, 12 Jul 2012 20:24:38 +0000 (+0000) Subject: Merged revisions 370015,370025 via svnmerge from X-Git-Tag: 10.8.0-digiumphones-rc1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2190019e491f7d76417f0eeba9cbc1a60d02502e;p=thirdparty%2Fasterisk.git Merged revisions 370015,370025 via svnmerge from file:///srv/subversion/repos/asterisk/branches/10 ................ r370015 | kmoore | 2012-07-12 15:05:45 -0500 (Thu, 12 Jul 2012) | 11 lines Include Expires header for SIP PUBLISH requests RFC3903 requres SIP PUBLISH requests to have Expires headers, so add them. Review: https://reviewboard.asterisk.org/r/2003/ Patch-by: gareth ........ Merged revisions 370014 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ................ r370025 | rmudgett | 2012-07-12 15:20:02 -0500 (Thu, 12 Jul 2012) | 8 lines Add missing ast_hangup() calls on some analog exception paths. Make starting analog_ss_thread() or __analog_ss_thread() failure paths hangup the channel. ........ Merged revisions 370017 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@370036 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 9a464248f0..07b50a503d 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -11708,6 +11708,7 @@ static struct dahdi_pvt *handle_init_event(struct dahdi_pvt *i, int event) ast_log(LOG_WARNING, "Cannot allocate new structure on channel %d\n", i->channel); } else if (ast_pthread_create_detached(&threadid, NULL, analog_ss_thread, chan)) { ast_log(LOG_WARNING, "Unable to start simple switch thread on channel %d\n", i->channel); + ast_hangup(chan); } } break; @@ -11975,6 +11976,7 @@ static void *do_monitor(void *data) res = ast_pthread_create_detached(&threadid, NULL, analog_ss_thread, chan); if (res) { ast_log(LOG_WARNING, "Unable to start simple switch thread on channel %d\n", i->channel); + ast_hangup(chan); } else { i->dtmfcid_holdoff_state = 1; } diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ca2d1f0196..572e8a41a1 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10646,7 +10646,7 @@ static int respprep(struct sip_request *resp, struct sip_pvt *p, const char *msg add_header(resp, "Session-Expires", se_hdr); } - if (msg[0] == '2' && (p->method == SIP_SUBSCRIBE || p->method == SIP_REGISTER)) { + if (msg[0] == '2' && (p->method == SIP_SUBSCRIBE || p->method == SIP_REGISTER || p->method == SIP_PUBLISH)) { /* For registration responses, we also need expiry and contact info */ char tmp[256]; diff --git a/channels/sig_analog.c b/channels/sig_analog.c index 2c4bbb4b85..35593ad055 100644 --- a/channels/sig_analog.c +++ b/channels/sig_analog.c @@ -3837,6 +3837,7 @@ void *analog_handle_init_event(struct analog_pvt *i, int event) ast_log(LOG_WARNING, "Cannot allocate new structure on channel %d\n", i->channel); } else if (ast_pthread_create_detached(&threadid, NULL, __analog_ss_thread, i)) { ast_log(LOG_WARNING, "Unable to start simple switch thread on channel %d\n", i->channel); + ast_hangup(chan); } } break; @@ -3861,6 +3862,7 @@ void *analog_handle_init_event(struct analog_pvt *i, int event) ast_log(LOG_WARNING, "Cannot allocate new structure on channel %d\n", i->channel); } else if (ast_pthread_create_detached(&threadid, NULL, __analog_ss_thread, i)) { ast_log(LOG_WARNING, "Unable to start simple switch thread on channel %d\n", i->channel); + ast_hangup(chan); } } break;