[asterisk-commits] mogorman: trunk r46823 - in /trunk: ./ channels/chan_gtalk.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Nov 1 13:38:05 MST 2006


Author: mogorman
Date: Wed Nov  1 14:38:05 2006
New Revision: 46823

URL: http://svn.digium.com/view/asterisk?rev=46823&view=rev
Log:
Merged revisions 46822 via svnmerge from 
https://svn.digium.com/svn/asterisk/branches/1.4

........
r46822 | mogorman | 2006-11-01 14:35:41 -0600 (Wed, 01 Nov 2006) | 2 lines

bind address support from bug 8164

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_gtalk.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_gtalk.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_gtalk.c?rev=46823&r1=46822&r2=46823&view=diff
==============================================================================
--- trunk/channels/chan_gtalk.c (original)
+++ trunk/channels/chan_gtalk.c Wed Nov  1 14:38:05 2006
@@ -1661,6 +1661,8 @@
 	struct ast_codec_pref prefs;
 	struct aji_client_container *clients;
 	struct gtalk_candidate *global_candidates = NULL;
+	struct hostent *hp;
+	struct ast_hostent ahp;
 
 	cfg = ast_config_load(GOOGLE_CONFIG);
 	if (!cfg)
@@ -1684,6 +1686,13 @@
 			ast_parse_allow_disallow(&prefs, &global_capability, var->value, 1);
 		else if (!strcasecmp(var->name, "context"))
 			ast_copy_string(context, var->value, sizeof(context));
+		else if (!strcasecmp(var->name, "bindaddr")) {
+			if (!(hp = ast_gethostbyname(var->value, &ahp))) {
+				ast_log(LOG_WARNING, "Invalid address: %s\n", var->value);
+			} else {
+				memcpy(&bindaddr.sin_addr, hp->h_addr, sizeof(bindaddr.sin_addr));
+			}
+		}
 /*  Idea to allow for custom candidates  */
 /*
 		else if (!strcasecmp(var->name, "candidate")) {



More information about the asterisk-commits mailing list