[svn-commits] russell: trunk r86150 - in /trunk: ./ channels/chan_sip.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Oct 17 13:01:39 CDT 2007
Author: russell
Date: Wed Oct 17 13:01:38 2007
New Revision: 86150
URL: http://svn.digium.com/view/asterisk?view=rev&rev=86150
Log:
Merged revisions 86149 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r86149 | russell | 2007-10-17 12:57:45 -0500 (Wed, 17 Oct 2007) | 8 lines
If Asterisk is in the middle of shutting down, respond to OPTIONS
with 503 Unavailable.
(closes issue #10994)
Reported by: eserra
Patches:
sip-options-503.patch uploaded by eserra (license 45)
........
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=86150&r1=86149&r2=86150
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Oct 17 13:01:38 2007
@@ -14429,13 +14429,19 @@
res = get_destination(p, req);
build_contact(p);
+
/* XXX Should we authenticate OPTIONS? XXX */
+
if (ast_strlen_zero(p->context))
ast_string_field_set(p, context, default_context);
- if (res < 0)
+
+ if (ast_shutting_down())
+ transmit_response_with_allow(p, "503 Unavailable", req, 0);
+ else if (res < 0)
transmit_response_with_allow(p, "404 Not Found", req, 0);
else
transmit_response_with_allow(p, "200 OK", req, 0);
+
/* Destroy if this OPTIONS was the opening request, but not if
it's in the middle of a normal call flow. */
if (!p->lastinvite)
More information about the svn-commits
mailing list