res_rtp_asterisk: Protect access to nochecksums with #ifdef

Recently code accessing nochecksums variable has been added without including #ifdef SO_NO_CHECK protection, while the variable is created only when such constant is defined.

ASTERISK-28852 #close

Change-Id: I381718893b80599ab8635f2b594a10c1000d595e
This commit is contained in:
Guido Falsi 2020-04-26 12:56:47 +02:00 committed by Joshua Colp
parent ca5c1e6336
commit 858d3216dd
1 changed files with 2 additions and 0 deletions

View File

@ -8868,7 +8868,9 @@ static char *handle_cli_rtp_settings(struct ast_cli_entry *e, int cmd, struct as
ast_cli(a->fd, "----------------\n");
ast_cli(a->fd, " Port start: %d\n", rtpstart);
ast_cli(a->fd, " Port end: %d\n", rtpend);
#ifdef SO_NO_CHECK
ast_cli(a->fd, " Checksums: %s\n", AST_CLI_YESNO(nochecksums == 0));
#endif
ast_cli(a->fd, " DTMF Timeout: %d\n", dtmftimeout);
ast_cli(a->fd, " Strict RTP: %s\n", AST_CLI_YESNO(strictrtp));