summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pjmedia/src/pjmedia/echo_speex.c4
-rw-r--r--pjsip/src/pjsip-simple/presence.c2
-rw-r--r--pjsip/src/test/uri_test.c6
3 files changed, 11 insertions, 1 deletions
diff --git a/pjmedia/src/pjmedia/echo_speex.c b/pjmedia/src/pjmedia/echo_speex.c
index 5d5203a4..5b4f4724 100644
--- a/pjmedia/src/pjmedia/echo_speex.c
+++ b/pjmedia/src/pjmedia/echo_speex.c
@@ -23,6 +23,9 @@
#include <pj/assert.h>
#include <pj/log.h>
#include <pj/pool.h>
+
+#if defined(PJMEDIA_HAS_SPEEX_AEC) && PJMEDIA_HAS_SPEEX_AEC != 0
+
#include <speex/speex_echo.h>
#include <speex/speex_preprocess.h>
@@ -185,3 +188,4 @@ PJ_DEF(pj_status_t) speex_aec_cancel_echo( void *state,
}
+#endif
diff --git a/pjsip/src/pjsip-simple/presence.c b/pjsip/src/pjsip-simple/presence.c
index ac344fd9..d567c6fc 100644
--- a/pjsip/src/pjsip-simple/presence.c
+++ b/pjsip/src/pjsip-simple/presence.c
@@ -701,7 +701,7 @@ static pj_status_t pres_process_rx_notify( pjsip_pres *pres,
{
const pj_str_t STR_MULTIPART = { "multipart", 9 };
pjsip_ctype_hdr *ctype_hdr;
- pj_status_t status;
+ pj_status_t status = PJ_SUCCESS;
*p_st_text = NULL;
diff --git a/pjsip/src/test/uri_test.c b/pjsip/src/test/uri_test.c
index 7807f506..d59a136d 100644
--- a/pjsip/src/test/uri_test.c
+++ b/pjsip/src/test/uri_test.c
@@ -952,6 +952,8 @@ static int uri_benchmark(unsigned *p_parse, unsigned *p_print, unsigned *p_cmp)
avg_parse = pj_elapsed_usec(&zero, &var.parse_time);
pj_highprec_mul(avg_parse, AVERAGE_URL_LEN);
pj_highprec_div(avg_parse, var.parse_len);
+ if (avg_parse == 0)
+ avg_parse = 1;
avg_parse = 1000000 / avg_parse;
PJ_LOG(3,(THIS_FILE,
@@ -969,6 +971,8 @@ static int uri_benchmark(unsigned *p_parse, unsigned *p_print, unsigned *p_cmp)
avg_print = pj_elapsed_usec(&zero, &var.print_time);
pj_highprec_mul(avg_print, AVERAGE_URL_LEN);
pj_highprec_div(avg_print, var.parse_len);
+ if (avg_print == 0)
+ avg_print = 1;
avg_print = 1000000 / avg_print;
PJ_LOG(3,(THIS_FILE,
@@ -986,6 +990,8 @@ static int uri_benchmark(unsigned *p_parse, unsigned *p_print, unsigned *p_cmp)
avg_cmp = pj_elapsed_usec(&zero, &var.cmp_time);
pj_highprec_mul(avg_cmp, AVERAGE_URL_LEN);
pj_highprec_div(avg_cmp, var.cmp_len);
+ if (avg_cmp == 0)
+ avg_cmp = 1;
avg_cmp = 1000000 / avg_cmp;
PJ_LOG(3,(THIS_FILE,