aboutsummaryrefslogtreecommitdiffstats
path: root/main/udptl.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-14 21:32:00 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-14 21:32:00 +0000
commit848841973a5c5b8d2de336ed32f5b4ab80ca8d79 (patch)
treed36d7d542d0d6ba89c806a8acd12d366bd58a368 /main/udptl.c
parentec6b2c6e0554dd4374dea87f80d99f9495a80b03 (diff)
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.4@116463 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/udptl.c')
-rw-r--r--main/udptl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/main/udptl.c b/main/udptl.c
index 718b46fb8..a9386ac09 100644
--- a/main/udptl.c
+++ b/main/udptl.c
@@ -639,8 +639,7 @@ struct ast_frame *ast_udptl_read(struct ast_udptl *udptl)
if (res < 0) {
if (errno != EAGAIN)
ast_log(LOG_WARNING, "UDPTL read error: %s\n", strerror(errno));
- if (errno == EBADF)
- CRASH;
+ ast_assert(errno != EBADF);
return &ast_null_frame;
}