mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 20:08:17 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@9001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
5
udptl.c
5
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 */
|
||||
|
||||
Reference in New Issue
Block a user