mark XXX some places where there is a return right before

a large "else" block, which is suitable for a reduction of
the nesting depth.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Luigi Rizzo 20 years ago
parent 8dbdd8518b
commit 24d1d23a93

@ -6750,6 +6750,9 @@ static enum check_auth_result check_auth(struct sip_pvt *p, struct sip_request *
sip_scheddestroy(p, SIP_TRANS_TIMEOUT); sip_scheddestroy(p, SIP_TRANS_TIMEOUT);
return AUTH_CHALLENGE_SENT; return AUTH_CHALLENGE_SENT;
} else { /* We have auth, so check it */ } else { /* We have auth, so check it */
/* XXX reduce nesting here */
/* Whoever came up with the authentication section of SIP can suck my %&#$&* for not putting /* Whoever came up with the authentication section of SIP can suck my %&#$&* for not putting
an example in the spec of just what it is you're doing a hash on. */ an example in the spec of just what it is you're doing a hash on. */
char a1_hash[256]; char a1_hash[256];
@ -12602,6 +12605,8 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY); ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
return 0; return 0;
} else { } else {
/* XXX reduce nesting here */
/* Initialize tag for new subscriptions */ /* Initialize tag for new subscriptions */
if (ast_strlen_zero(p->tag)) if (ast_strlen_zero(p->tag))
make_our_tag(p->tag, sizeof(p->tag)); make_our_tag(p->tag, sizeof(p->tag));
@ -12700,6 +12705,7 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY); ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
return 0; return 0;
} else { } else {
/* XXX reduce nesting here */
struct sip_pvt *p_old; struct sip_pvt *p_old;
transmit_response(p, "200 OK", req); transmit_response(p, "200 OK", req);

Loading…
Cancel
Save