]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_rtp_asterisk: Remove some unused structure fields.
authorSean Bright <sean.bright@gmail.com>
Fri, 14 Dec 2018 16:50:40 +0000 (11:50 -0500)
committerSean Bright <sean.bright@gmail.com>
Fri, 14 Dec 2018 17:42:31 +0000 (12:42 -0500)
All of the fields that were removed were no longer referenced except for
'lastrxts' and 'rxseqno' which were only ever written to.

Change-Id: I5a5d31eb33e97663843698f58d0d97f22a76627c

res/res_rtp_asterisk.c

index 164e54db8315d9f1892d45aa15cca7df95108dbf..c0e9e63e3a468ecfb47cae0ca1b6f1176e921a16 100644 (file)
@@ -304,12 +304,10 @@ struct ast_rtp {
        unsigned int themssrc;          /*!< Their SSRC */
        unsigned int themssrc_valid;    /*!< True if their SSRC is available. */
        unsigned int lastts;
-       unsigned int lastrxts;
        unsigned int lastividtimestamp;
        unsigned int lastovidtimestamp;
        unsigned int lastitexttimestamp;
        unsigned int lastotexttimestamp;
-       unsigned int lasteventseqn;
        int lastrxseqno;                /*!< Last received sequence number */
        unsigned short seedrxseqno;     /*!< What sequence number did they start with?*/
        unsigned int seedrxts;          /*!< What RTP timestamp did they start with? */
@@ -323,10 +321,6 @@ struct ast_rtp {
        struct ast_format *lasttxformat;
        struct ast_format *lastrxformat;
 
-       int rtptimeout;                 /*!< RTP timeout time (negative or zero means disabled, negative value means temporarily disabled) */
-       int rtpholdtimeout;             /*!< RTP timeout when on hold (negative or zero means disabled, negative value means temporarily disabled). */
-       int rtpkeepalive;               /*!< Send RTP comfort noice packets for keepalive */
-
        /* DTMF Reception Variables */
        char resp;                        /*!< The current digit being processed */
        unsigned int last_seqno;          /*!< The last known sequence number for any DTMF packet */
@@ -345,17 +339,11 @@ struct ast_rtp {
        struct timeval rxcore;
        struct timeval txcore;
        double drxcore;                 /*!< The double representation of the first received packet */
-       struct timeval lastrx;          /*!< timeval when we last received a packet */
        struct timeval dtmfmute;
        struct ast_smoother *smoother;
-       int *ioid;
        unsigned short seqno;           /*!< Sequence number, RFC 3550, page 13. */
-       unsigned short rxseqno;
        struct ast_sched_context *sched;
-       struct io_context *io;
-       void *data;
        struct ast_rtcp *rtcp;
-       struct ast_rtp *bridged;        /*!< Who we are Packet bridged to */
        unsigned int asymmetric_codec;  /*!< Indicate if asymmetric send/receive codecs are allowed */
 
        enum strict_rtp_state strict_rtp_state; /*!< Current state that strict RTP protection is in */
@@ -5558,7 +5546,6 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
                                ast_sockaddr_copy(&rtp->rtcp->them, &addr);
                                ast_sockaddr_set_port(&rtp->rtcp->them, ast_sockaddr_port(&addr) + 1);
                        }
-                       rtp->rxseqno = 0;
                        ast_set_flag(rtp, FLAG_NAT_ACTIVE);
                        if (rtpdebug)
                                ast_debug(0, "RTP NAT: Got audio from other end. Now sending to address %s\n",
@@ -5743,7 +5730,6 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
                        ast_codec_media_type2str(ast_format_get_type(rtp->f.subclass.format)));
                return &ast_null_frame;
        }
-       rtp->rxseqno = seqno;
 
        if (rtp->dtmf_timeout && rtp->dtmf_timeout < timestamp) {
                rtp->dtmf_timeout = 0;
@@ -5759,8 +5745,6 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
                }
        }
 
-       rtp->lastrxts = timestamp;
-
        rtp->f.src = "RTP";
        rtp->f.mallocd = 0;
        rtp->f.datalen = res - hdrlen;
@@ -6058,8 +6042,6 @@ static void ast_rtp_remote_address_set(struct ast_rtp_instance *instance, struct
                rtp->rtcp->local_addr_str = ast_strdup(ast_sockaddr_stringify(&local));
        }
 
-       rtp->rxseqno = 0;
-
        if (strictrtp && rtp->strict_rtp_state != STRICT_RTP_OPEN
                && !ast_sockaddr_isnull(addr) && ast_sockaddr_cmp(addr, &rtp->strict_rtp_address)) {
                /* We only need to learn a new strict source address if we've been told the source is