reduce indentation of two large blocks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
6d6e60be79
commit
59e61ae4a0
1 changed files with 93 additions and 94 deletions
|
@ -13846,8 +13846,8 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
|
|||
transmit_response(p, "404 Not Found", req);
|
||||
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
|
||||
return 0;
|
||||
} else {
|
||||
/* XXX reduce nesting here */
|
||||
}
|
||||
|
||||
/* Initialize tag for new subscriptions */
|
||||
if (ast_strlen_zero(p->tag))
|
||||
make_our_tag(p->tag, sizeof(p->tag));
|
||||
|
@ -13909,9 +13909,9 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
|
|||
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (p->subscribed != MWI_NOTIFICATION && !resubscribe)
|
||||
p->stateid = ast_extension_state_add(p->context, p->exten, cb_extensionstate, p);
|
||||
}
|
||||
|
||||
if (!ast_test_flag(req, SIP_PKT_IGNORE) && p)
|
||||
p->lastinvite = seqno;
|
||||
|
@ -13943,15 +13943,15 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
|
|||
ASTOBJ_UNLOCK(p->relatedpeer);
|
||||
}
|
||||
} else {
|
||||
struct sip_pvt *p_old;
|
||||
|
||||
if ((firststate = ast_extension_state(NULL, p->context, p->exten)) < 0) {
|
||||
|
||||
ast_log(LOG_ERROR, "Got SUBSCRIBE for extension %s@%s from %s, but there is no hint for that extension\n", p->exten, p->context, ast_inet_ntoa(p->sa.sin_addr));
|
||||
transmit_response(p, "404 Not found", req);
|
||||
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
|
||||
return 0;
|
||||
} else {
|
||||
/* XXX reduce nesting here */
|
||||
struct sip_pvt *p_old;
|
||||
}
|
||||
|
||||
transmit_response(p, "200 OK", req);
|
||||
transmit_state_notify(p, firststate, 1); /* Send first notification */
|
||||
|
@ -13985,7 +13985,6 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
|
|||
}
|
||||
ast_mutex_unlock(&iflock);
|
||||
}
|
||||
}
|
||||
if (!p->expiry)
|
||||
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue