From 3126d18c1bd55a2680b61976acbe3dc79194da14 Mon Sep 17 00:00:00 2001
From: Matthew Jordan <mjordan@digium.com>
Date: Tue, 8 Jul 2014 14:38:42 +0000
Subject: [PATCH] res_rtp_asterisk: Fix undefined function when PJPROJECT is
 not installed

The dtls_perform_handshake function was mistakenly placed under the guards for
USE_PJPROJECT. If PJPROJECT was not installed, the function would not be
defined, while other functions would attempt to still use it. This prevented
res_rtp_asterisk from being loaded.

ASTERISK-24001 #close
Reported by: Don Fanning
........

Merged revisions 418172 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 res/res_rtp_asterisk.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index f1607e003c..7251e8f80c 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -1207,9 +1207,6 @@ static struct ast_rtp_engine asterisk_rtp_engine = {
 #endif
 };
 
-#ifdef HAVE_PJPROJECT
-static void rtp_learning_seq_init(struct rtp_learning_info *info, uint16_t seq);
-
 #ifdef HAVE_OPENSSL_SRTP
 static void dtls_perform_handshake(struct ast_rtp_instance *instance, struct dtls_details *dtls, int rtcp)
 {
@@ -1233,6 +1230,9 @@ static void dtls_perform_handshake(struct ast_rtp_instance *instance, struct dtl
 }
 #endif
 
+#ifdef HAVE_PJPROJECT
+static void rtp_learning_seq_init(struct rtp_learning_info *info, uint16_t seq);
+
 static void ast_rtp_on_ice_complete(pj_ice_sess *ice, pj_status_t status)
 {
 	struct ast_rtp_instance *instance = ice->user_data;
-- 
GitLab