[Asterisk-code-review] Resources/res_rtp_asterisk: Fix build failure due to missing symbols ... (asterisk[19])

Guido Falsi asteriskteam at digium.com
Fri Sep 17 15:05:28 CDT 2021


Guido Falsi has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/16514 )


Change subject: Resources/res_rtp_asterisk: Fix build failure due to missing symbols when HAVE_PJPROJECT is false
......................................................................

Resources/res_rtp_asterisk: Fix build failure due to missing symbols when HAVE_PJPROJECT is false

Some code has been aded referencing symbols defined in a block
protected by #ifdef HAVE_PJPROJECT. Protect those code parts in

ASTERISK-29660

Change-Id: Ib18d4392d51ac80ca5481dabf6e498a4e3e49e6f
---
M res/res_rtp_asterisk.c
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/14/16514/1

diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 6da4824..5bb6e2a 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 */

-- 
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: 1
Gerrit-Owner: Guido Falsi <madpilot at freebsd.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210917/0d5ecee4/attachment.html>


More information about the asterisk-code-review mailing list