aboutsummaryrefslogtreecommitdiffstats
path: root/udptl.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-31 17:18:58 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-31 17:18:58 +0000
commitb55d2bd3eaca8d5775ab0e8db5b85fa3f1066ce1 (patch)
tree5d573d837383e784c67dabc01fcfad5e8aec9801 /udptl.c
parentd00a87e2dcf7407f81d62d682474784cedb5a141 (diff)
define a global null_frame object so when queueing a null frame, you don't
have to allocate one on the stack git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9001 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'udptl.c')
-rw-r--r--udptl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/udptl.c b/udptl.c
index 528ff4ace..d19bb89e2 100644
--- a/udptl.c
+++ b/udptl.c
@@ -645,7 +645,6 @@ struct ast_frame *ast_udptl_read(struct ast_udptl *udptl)
uint16_t seqno = 0;
char iabuf[INET_ADDRSTRLEN];
uint16_t *udptlheader;
- static struct ast_frame null_frame = { AST_FRAME_NULL, };
len = sizeof(sin);
@@ -662,12 +661,12 @@ struct ast_frame *ast_udptl_read(struct ast_udptl *udptl)
ast_log(LOG_WARNING, "UDPTL read error: %s\n", strerror(errno));
if (errno == EBADF)
CRASH;
- return &null_frame;
+ return &ast_null_frame;
}
/* Ignore if the other side hasn't been given an address yet. */
if (!udptl->them.sin_addr.s_addr || !udptl->them.sin_port)
- return &null_frame;
+ return &ast_null_frame;
if (udptl->nat) {
/* Send to whoever sent to us */