[Asterisk-code-review] res_rtp_asterisk.c: Fix build failure when not building with pjproject. (asterisk[19])
Friendly Automation
asteriskteam at digium.com
Tue Sep 21 11:03:40 CDT 2021
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/16514 )
Change subject: res_rtp_asterisk.c: Fix build failure when not building with pjproject.
......................................................................
res_rtp_asterisk.c: Fix build failure when not building with pjproject.
Some code has been added referencing symbols defined in a block
protected by #ifdef HAVE_PJPROJECT. Protect those code parts in
ifdef blocks too.
ASTERISK-29660
Change-Id: Ib18d4392d51ac80ca5481dabf6e498a4e3e49e6f
---
M res/res_rtp_asterisk.c
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
Sean Bright: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 6da4824..8ede400 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -655,8 +655,10 @@
static int __rtp_sendto(struct ast_rtp_instance *instance, void *buf, size_t size, int flags, struct ast_sockaddr *sa, int rtcp, int *via_ice, int use_srtp);
+#ifdef HAVE_PJPROJECT
static void stunaddr_resolve_callback(const struct ast_dns_query *query);
static int store_stunaddr_resolved(const struct ast_dns_query *query);
+#endif
#if defined(HAVE_OPENSSL) && (OPENSSL_VERSION_NUMBER >= 0x10001000L) && !defined(OPENSSL_NO_SRTP)
static int dtls_bio_new(BIO *bio)
@@ -9026,6 +9028,7 @@
return 0;
}
+#ifdef HAVE_PJPROJECT
static void stunaddr_resolve_callback(const struct ast_dns_query *query)
{
const int lowest_ttl = ast_dns_result_get_lowest_ttl(ast_dns_query_get_result(query));
@@ -9091,6 +9094,7 @@
memset(&stunaddr, 0, sizeof(stunaddr));
ast_rwlock_unlock(&stunaddr_lock);
}
+#endif
#if defined(HAVE_OPENSSL) && (OPENSSL_VERSION_NUMBER >= 0x10001000L) && !defined(OPENSSL_NO_SRTP)
/*! \pre instance is locked */
@@ -9189,7 +9193,9 @@
static char *handle_cli_rtp_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
+#ifdef HAVE_PJPROJECT
struct sockaddr_in stunaddr_copy;
+#endif
switch (cmd) {
case CLI_INIT:
e->command = "rtp show settings";
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16514
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 19
Gerrit-Change-Id: Ib18d4392d51ac80ca5481dabf6e498a4e3e49e6f
Gerrit-Change-Number: 16514
Gerrit-PatchSet: 3
Gerrit-Owner: Guido Falsi <madpilot at freebsd.org>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210921/8345e0bc/attachment.html>
More information about the asterisk-code-review
mailing list