aboutsummaryrefslogtreecommitdiffstats
path: root/main/udptl.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-11 11:39:32 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-11 11:39:32 +0000
commitf45ff7f7a5d10592332e39b66383f5772fda3ffe (patch)
tree6116ce1392c3e60cea8ad9a97c258e888d328ce0 /main/udptl.c
parent726b582e5012b8c3b1d56163dd8d7907687ee194 (diff)
Merged revisions 107373 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r107373 | kpfleming | 2008-03-11 06:36:51 -0500 (Tue, 11 Mar 2008) | 19 lines Merged revisions 107352 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r107352 | kpfleming | 2008-03-11 06:04:29 -0500 (Tue, 11 Mar 2008) | 11 lines fix up various compiler warnings found with gcc-4.3: - the output of flex includes a static function called 'input' that is not used, so for the moment we'll stop having the compiler tell us about unused variables in the flex source files (a better fix would be to improve our flex post-processing to remove the unused function) - main/stdtime/localtime.c makes assumptions about signed integer overflow, and gcc-4.3's improved optimizer tries to take advantage of handling potential overflow conditions at compile time; for now, suppress these optimizations until we can fiure out if the code needs improvement - main/udptl.c has some references to uninitialized variables; in one case there was no bug, but in the other it was certainly possibly for unexpected behavior to occur - main/editline/readline.c had an unused variable ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@107374 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/udptl.c')
-rw-r--r--main/udptl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/main/udptl.c b/main/udptl.c
index 6ce344328..2f0e1fb97 100644
--- a/main/udptl.c
+++ b/main/udptl.c
@@ -860,6 +860,7 @@ void ast_udptl_set_peer(struct ast_udptl *udptl, struct sockaddr_in *them)
void ast_udptl_get_peer(struct ast_udptl *udptl, struct sockaddr_in *them)
{
+ memset(them, 0, sizeof(*them));
them->sin_family = AF_INET;
them->sin_port = udptl->them.sin_port;
them->sin_addr = udptl->them.sin_addr;
@@ -1013,13 +1014,15 @@ int ast_udptl_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags,
}
if (pr0->set_udptl_peer(c0, p1)) {
ast_log(LOG_WARNING, "Channel '%s' failed to talk to '%s'\n", c0->name, c1->name);
+ memset(&ac1, 0, sizeof(ac1));
} else {
/* Store UDPTL peer */
ast_udptl_get_peer(p1, &ac1);
}
- if (pr1->set_udptl_peer(c1, p0))
+ if (pr1->set_udptl_peer(c1, p0)) {
ast_log(LOG_WARNING, "Channel '%s' failed to talk back to '%s'\n", c1->name, c0->name);
- else {
+ memset(&ac0, 0, sizeof(ac0));
+ } else {
/* Store UDPTL peer */
ast_udptl_get_peer(p0, &ac0);
}