diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-30 19:23:16 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-30 19:23:16 +0000 |
commit | 71dceefced78a68c5a22c661f01a15e085f4639f (patch) | |
tree | c56c9a073b45530ea38f113e94aa9ecdb482b6b5 /channels | |
parent | 0d2d156f1d5b30f9a1333e2066b6cb7951e5c799 (diff) |
I just noticed this construct and thought it was
silly to have a bunch of case statements with duplicated
code in each case. Instead, just use the built-in fallthrough
capability of case statements and reduce the code to
a single instance
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152879 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 03eb7530c..d66ba7816 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -16604,18 +16604,9 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ switch(resp) { case 100: /* 100 Trying */ case 101: /* 101 Dialog establishment */ - if (sipmethod == SIP_INVITE) - handle_response_invite(p, resp, rest, req, seqno); - break; case 183: /* 183 Session Progress */ - if (sipmethod == SIP_INVITE) - handle_response_invite(p, resp, rest, req, seqno); - break; case 180: /* 180 Ringing */ - if (sipmethod == SIP_INVITE) - handle_response_invite(p, resp, rest, req, seqno); - break; - case 182: /* 182 Queued */ + case 182: /* 182 Queued */ if (sipmethod == SIP_INVITE) handle_response_invite(p, resp, rest, req, seqno); break; |