[asterisk-commits] russell: branch 1.4 r86149 - /branches/1.4/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Oct 17 12:57:45 CDT 2007
Author: russell
Date: Wed Oct 17 12:57:45 2007
New Revision: 86149
URL: http://svn.digium.com/view/asterisk?view=rev&rev=86149
Log:
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:
branches/1.4/channels/chan_sip.c
Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=86149&r1=86148&r2=86149
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Wed Oct 17 12:57:45 2007
@@ -13202,13 +13202,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 asterisk-commits
mailing list