From 6a1e4e1b433d8ce1f37554f5baca1c417fc21023 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 3 Dec 2013 13:00:09 +0100 Subject: Report errors in SRTP decrypt. --- src/srtp.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/srtp.cc b/src/srtp.cc index 98c4002..72b3651 100644 --- a/src/srtp.cc +++ b/src/srtp.cc @@ -202,18 +202,22 @@ int SRTP::decrypt(char *packet, size_t size) case err_status_replay_fail: // TODO: throw SRTP::ReplayException();// (replay check failed) printf("srtp_unprotect failed replay %d\n", status); + sz = -1; break; case err_status_replay_old: // TODO: throw SRTP::ReplayOldException();// (replay check failed) printf("srtp_unprotect failed replay_old %d\n", status); + sz = -1; break; case err_status_auth_fail: // TODO: throw SRTP::AuthCheckException();// (auth check failed) printf("srtp_unprotect failed auth %d\n", status); + sz = -1; break; default: // TODO: throw SRTP::UnprotectException(); printf("srtp_unprotect failed %d\n", status); + sz = -1; break; } -- cgit v1.2.3