aboutsummaryrefslogtreecommitdiffstats
path: root/main/rtp.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-14 21:41:09 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-14 21:41:09 +0000
commit4ad7fb3e3eb97dfcc2c94fe1f38ce4b0e8642ee9 (patch)
tree5504856a16a1aec786aed24d36f461bbe58f9fac /main/rtp.c
parent01a8e6db758145b73234ff8ab26cfd6db20551a0 (diff)
Merged revisions 116469 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r116469 | russell | 2008-05-14 16:40:43 -0500 (Wed, 14 May 2008) | 12 lines Merged revisions 116463 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r116463 | russell | 2008-05-14 16:32:00 -0500 (Wed, 14 May 2008) | 4 lines Add ast_assert(), which can be used to handle fatal errors. It is only compiled in if dev-mode is enabled, and only aborts if DO_CRASH is defined. (inspired by issue #12650) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@116470 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/rtp.c')
-rw-r--r--main/rtp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/main/rtp.c b/main/rtp.c
index f4913db17..1f1c9e669 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -1077,8 +1077,7 @@ struct ast_frame *ast_rtcp_read(struct ast_rtp *rtp)
rtcpheader = (unsigned int *)(rtcpdata + AST_FRIENDLY_OFFSET);
if (res < 0) {
- if (errno == EBADF)
- CRASH;
+ ast_assert(errno != EBADF);
if (errno != EAGAIN) {
ast_log(LOG_WARNING, "RTCP Read error: %s. Hanging up.\n", strerror(errno));
return NULL;
@@ -1420,8 +1419,7 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
rtpheader = (unsigned int *)(rtp->rawdata + AST_FRIENDLY_OFFSET);
if (res < 0) {
- if (errno == EBADF)
- CRASH;
+ ast_assert(errno != EBADF);
if (errno != EAGAIN) {
ast_log(LOG_WARNING, "RTP Read error: %s. Hanging up.\n", strerror(errno));
return NULL;