[Asterisk-code-review] res_rtp_asterisk: Statically declare rtp_drop_packets_data struct (asterisk[18])
Kevin Harwell
asteriskteam at digium.com
Wed Mar 31 12:24:48 CDT 2021
Kevin Harwell has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/15717 )
Change subject: res_rtp_asterisk: Statically declare rtp_drop_packets_data struct
......................................................................
res_rtp_asterisk: Statically declare rtp_drop_packets_data struct
This patch makes the drop_packets_data object static. Also, while
this should mean object attributes are default initialized this
patch explicitly initializes num_to_drop to zero (disabled) for
good measure.
Change-Id: If4f9b21fa0c47d41a35b6b05941d978efb4da87b
---
M res/res_rtp_asterisk.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/17/15717/1
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 17041fe..6c578b5 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -7541,7 +7541,7 @@
#ifdef AST_DEVMODE
-struct rtp_drop_packets_data {
+static struct rtp_drop_packets_data {
/* Whether or not to randomize the number of packets to drop. */
unsigned int use_random_num;
/* Whether or not to randomize the time interval between packets drops. */
@@ -7560,7 +7560,7 @@
struct ast_sockaddr addr;
/* The optional port from which to drop packets from. */
unsigned int port;
-} drop_packets_data;
+} drop_packets_data = { .num_to_drop = 0 };
static void drop_packets_data_update(struct timeval tv)
{
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15717
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: If4f9b21fa0c47d41a35b6b05941d978efb4da87b
Gerrit-Change-Number: 15717
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210331/fdd03088/attachment.html>
More information about the asterisk-code-review
mailing list