summaryrefslogtreecommitdiff
path: root/pjsip-apps
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-02-18 12:16:23 +0000
committerBenny Prijono <bennylp@teluu.com>2008-02-18 12:16:23 +0000
commitc9ad38b89fddbff056eed9ac478cde731cf6d0f9 (patch)
tree64c38d7ee879ed46b0c4c291b2f01e6ed3264df5 /pjsip-apps
parent41a934f675c052709bf2cc09e5c365117979e11e (diff)
Fixed build error if SRTP is disabled in compile time (thanks Helmut Wolf)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1802 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r--pjsip-apps/src/pjsua/pjsua_app.c3
-rw-r--r--pjsip-apps/src/samples/pcaputil.c7
2 files changed, 9 insertions, 1 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c
index f9dd1a31..39560f11 100644
--- a/pjsip-apps/src/pjsua/pjsua_app.c
+++ b/pjsip-apps/src/pjsua/pjsua_app.c
@@ -1324,6 +1324,7 @@ static int write_settings(const struct app_config *config,
pj_strcat2(&cfg, "\n#\n# Media settings:\n#\n");
/* SRTP */
+#if PJMEDIA_HAS_SRTP
if (app_config.cfg.use_srtp != PJSUA_DEFAULT_USE_SRTP) {
pj_ansi_sprintf(line, "--use-srtp %d\n",
app_config.cfg.use_srtp);
@@ -1336,7 +1337,7 @@ static int write_settings(const struct app_config *config,
app_config.cfg.srtp_secure_signaling);
pj_strcat2(&cfg, line);
}
-
+#endif
/* Media */
if (config->media_cfg.enable_ice)
diff --git a/pjsip-apps/src/samples/pcaputil.c b/pjsip-apps/src/samples/pcaputil.c
index e5954105..9ea77a02 100644
--- a/pjsip-apps/src/samples/pcaputil.c
+++ b/pjsip-apps/src/samples/pcaputil.c
@@ -154,6 +154,7 @@ static void read_rtp(pj_uint8_t *buf, pj_size_t bufsize,
}
/* Decrypt SRTP */
+#if PJMEDIA_HAS_SRTP
if (app.srtp) {
int len = sz;
status = pjmedia_transport_srtp_decrypt_pkt(app.srtp, PJ_TRUE,
@@ -177,6 +178,7 @@ static void read_rtp(pj_uint8_t *buf, pj_size_t bufsize,
continue;
}
}
+#endif
/* Update RTP session */
pjmedia_rtp_session_update(&app.rtp_sess, r, &seq_st);
@@ -246,6 +248,7 @@ static void pcap2wav(const char *wav_filename, const pj_str_t *srtp_crypto,
#endif /* PJMEDIA_HAS_L16_CODEC */
/* Create SRTP transport is needed */
+#if PJMEDIA_HAS_SRTP
if (srtp_crypto->slen) {
pjmedia_srtp_crypto crypto;
@@ -255,6 +258,10 @@ static void pcap2wav(const char *wav_filename, const pj_str_t *srtp_crypto,
T( pjmedia_transport_srtp_create(app.mept, NULL, NULL, &app.srtp) );
T( pjmedia_transport_srtp_start(app.srtp, &crypto, &crypto) );
}
+#else
+ PJ_UNUSED_ARG(srtp_crypto);
+ PJ_UNUSED_ARG(srtp_key);
+#endif
/* Read first packet */
read_rtp(pkt0.buffer, sizeof(pkt0.buffer), &pkt0.rtp,