aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-15 22:17:17 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-15 22:17:17 +0000
commit3f7d8e58c074da7d3758d03783f4f91503580a3d (patch)
tree420ffe6ab5f3af4d678bba431d27d8d357856e32 /res
parent22eae2706da4dd25a5d95ab79f87d3b903ad706a (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.8@287056 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-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;
}