summaryrefslogtreecommitdiff
path: root/res/res_srtp.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2010-09-15 22:28:29 +0000
committerTerry Wilson <twilson@digium.com>2010-09-15 22:28:29 +0000
commita51ce289b256a0edc086c3472ae7bf110867c292 (patch)
tree1a54cbc61d3205169d085d7ea5e9dcc2b4ae501f /res/res_srtp.c
parenteee14db850fe83fb4b4a3a73e3abb78972e23c04 (diff)
Merged revisions 287056 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r287056 | twilson | 2010-09-15 17:17:17 -0500 (Wed, 15 Sep 2010) | 10 lines Don't hang up a call on an SRTP unprotect failure Also make it more obvious when there is an issue en/decrypting. (closes issue #17563) Reported by: Alexcr Patches: res_srtp.c.patch uploaded by sfritsch (license 1089) Tested by: twilson ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@287057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_srtp.c')
-rw-r--r--res/res_srtp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/res/res_srtp.c b/res/res_srtp.c
index f92154f90..76566d7de 100644
--- a/res/res_srtp.c
+++ b/res/res_srtp.c
@@ -343,7 +343,8 @@ static int ast_srtp_unprotect(struct ast_srtp *srtp, void *buf, int *len, int rt
}
if (res != err_status_ok && res != err_status_replay_fail ) {
- ast_debug(1, "SRTP unprotect: %s\n", srtp_errstr(res));
+ ast_log(LOG_WARNING, "SRTP unprotect: %s\n", srtp_errstr(res));
+ errno = EAGAIN;
return -1;
}
@@ -361,7 +362,7 @@ static int ast_srtp_protect(struct ast_srtp *srtp, void **buf, int *len, int rtc
memcpy(srtp->buf, *buf, *len);
if ((res = rtcp ? srtp_protect_rtcp(srtp->session, srtp->buf, len) : srtp_protect(srtp->session, srtp->buf, len)) != err_status_ok && res != err_status_replay_fail) {
- ast_debug(1, "SRTP protect: %s\n", srtp_errstr(res));
+ ast_log(LOG_WARNING, "SRTP protect: %s\n", srtp_errstr(res));
return -1;
}