summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2013-02-24 23:01:17 +0000
committerMatthew Jordan <mjordan@digium.com>2013-02-24 23:01:17 +0000
commitf6abcce7c18d7287d58035c7e633e5940a25e6ac (patch)
tree15efa9f22851b8e7264b8d371fa51f2a6ce155d0 /channels
parent182098ba9665b2ad70f6a8312ebaa0a60a380e6e (diff)
Set the sin_family on the bind address socket during initialization
Somehow, chan_jingle has managed to operate for years without setting the sin_family on its bindaddr socket. This patch properly sets the field during initial module load to AF_INET. Note that the patch on the issue was modified slightly to change the initialization of the socket from allocation of a chan_jingle private to the module initialization, as the bindaddr object (which is static) only needs to have the address set once. (closes issue ASTERISK-19341) Reported by: andre valentin patches: 0105-chan_jingle.patch uploaded by avalentin (License 6064) ........ Merged revisions 381975 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 381976 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_jingle.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/channels/chan_jingle.c b/channels/chan_jingle.c
index d65d12698..717afae67 100644
--- a/channels/chan_jingle.c
+++ b/channels/chan_jingle.c
@@ -2002,6 +2002,7 @@ static int load_module(void)
ast_log(LOG_WARNING, "Unable to create I/O context\n");
}
+ bindaddr.sin_family = AF_INET;
ast_sockaddr_from_sin(&bindaddr_tmp, &bindaddr);
if (ast_find_ourip(&ourip_tmp, &bindaddr_tmp, AF_INET)) {
ast_log(LOG_WARNING, "Unable to get own IP address, Jingle disabled\n");