]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
don't explode if a box running CVS head sends trunk frames with timestamps (bug ...
authorRussell Bryant <russell@russellbryant.com>
Fri, 18 Mar 2005 17:30:05 +0000 (17:30 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 18 Mar 2005 17:30:05 +0000 (17:30 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5202 65c4cc65-6c06-0410-ace0-fbb531ad65f3

CHANGES
channels/chan_iax2.c

diff --git a/CHANGES b/CHANGES
index 2d579e71822f0581af098d57467abacbda982bc2..8ec3e0e012cb445bd9a81406a551c2ec99ca6f5e 100755 (executable)
--- a/CHANGES
+++ b/CHANGES
@@ -11,6 +11,10 @@ Asterisk 1.0.7
        but has now been fixed.
  -- chan_skinny
     -- A check has been added to avoid a crash.
+ -- chan_iax2
+    -- A feature has been added to CVS head to have the option of sending timestamps with
+       trunk frames.  It is not supported in 1.0, but a change has been made so that it
+       will at least not choke if sent trunk timestamps.
  -- app_voicemail
     -- Some checks have been added to avoid a crash.
  -- speex
index f76a471ec81c95d22ee0593f97a20c1701c46798..a440e1429f6dd677a50e95f815095613b4aa6ada 100755 (executable)
@@ -5063,6 +5063,10 @@ static int socket_read(int *id, int fd, short events, void *cbdata)
                /* This is a meta header */
                switch(meta->metacmd) {
                case IAX_META_TRUNK:
+                       if (meta->cmddata != 0) {
+                               ast_log(LOG_WARNING, "meta trunk cmd %d received, I only understand 0 (perhaps the remote side is sending trunk timestamps?)\n", meta->cmddata);
+                               return 1;
+                       }
                        if (res < sizeof(struct ast_iax2_meta_hdr) + sizeof(struct ast_iax2_meta_trunk_hdr)) {
                                ast_log(LOG_WARNING, "midget meta trunk packet received (%d of %d min)\n", res, (int)sizeof(struct ast_iax2_mini_hdr));
                                return 1;