aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-10-11 18:51:13 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-10-11 18:51:13 +0000
commitd7395f7444094787b408eda1fe5e21a8e47e94f2 (patch)
tree7eca00106c785d10abda29c9ac0868a0aae1d99f /channels
parentdd96a06d31cbfb274fba5655bcfbcedaf7f7d5e4 (diff)
Move declaration closer to where now used.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@291113 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 802f13dea..9d66c05d6 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -7342,7 +7342,6 @@ static enum match_req_res match_req_to_dialog(struct sip_pvt *sip_pvt_ptr, struc
*/
static struct sip_pvt *find_call(struct sip_request *req, struct ast_sockaddr *addr, const int intended_method)
{
- struct sip_pvt *p = NULL;
char totag[128];
char fromtag[128];
const char *callid = get_header(req, "Call-ID");
@@ -7456,6 +7455,8 @@ static struct sip_pvt *find_call(struct sip_request *req, struct ast_sockaddr *a
/* See if the method is capable of creating a dialog */
if (sip_methods[intended_method].can_create == CAN_CREATE_DIALOG) {
+ struct sip_pvt *p = NULL;
+
if (intended_method == SIP_REFER) {
/* We do support REFER, but not outside of a dialog yet */
transmit_response_using_temp(callid, addr, 1, intended_method, req, "603 Declined (no dialog)");