aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-24 18:28:47 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-24 18:28:47 +0000
commitfbe745b7e7358a165a78c04cf280f451b5b20278 (patch)
tree878d919e1ab0ecc6744187f1787ec26489b32849 /channels
parent24e6e43cf98eec2bd33245f8e0a183acb603f2fc (diff)
Use the handy UNLINK macro instead of hand-coding the same thing in-line.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@202966 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 9498b6352..1b97606d8 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -15530,11 +15530,7 @@ static int handle_request_cancel(struct sip_pvt *p, struct sip_request *req)
for (pkt = p->packets, prev_pkt = NULL; pkt; prev_pkt = pkt, pkt = pkt->next) {
if (pkt->seqno == p->lastinvite && pkt->response_code == 487) {
AST_SCHED_DEL(sched, pkt->retransid);
- if (prev_pkt) {
- prev_pkt->next = pkt->next;
- } else {
- p->packets = pkt->next;
- }
+ UNLINK(pkt, p->packets, prev_pkt);
ast_free(pkt);
break;
}