]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 202967 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Wed, 24 Jun 2009 18:30:09 +0000 (18:30 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 24 Jun 2009 18:30:09 +0000 (18:30 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r202967 | mmichelson | 2009-06-24 13:29:10 -0500 (Wed, 24 Jun 2009) | 9 lines

  Merged revisions 202966 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r202966 | mmichelson | 2009-06-24 13:28:47 -0500 (Wed, 24 Jun 2009) | 3 lines

    Use the handy UNLINK macro instead of hand-coding the same thing in-line.
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@202969 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 03e35cbc392b71510700c34a1560c655b573e03c..b89db1818b5209210d41ae39be49583a30adb2f6 100644 (file)
@@ -19248,11 +19248,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;
                        }