[Freeswitch-svn] [commit] r13140 - freeswitch/trunk/src/mod/applications/mod_commands

FreeSWITCH SVN mikej at freeswitch.org
Fri Apr 24 08:08:31 PDT 2009


Author: mikej
Date: Fri Apr 24 10:08:31 2009
New Revision: 13140

Log:
mod_commands: if no bind ip specified for stun fsapi command, use the guess ip.

Modified:
   freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c

Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	Fri Apr 24 10:08:31 2009
@@ -527,7 +527,7 @@
 	char *stun_ip = NULL;
 	switch_port_t stun_port = (switch_port_t)SWITCH_STUN_DEFAULT_PORT;
 	char *p;
-	char ip_buf[50] = "";
+	char ip_buf[256] = "";
 	char *ip = NULL;
 	char *pip = NULL;
 	switch_port_t port = 0;
@@ -560,6 +560,8 @@
 
 	if (pip) {
 		switch_copy_string(ip_buf, pip, sizeof(ip_buf));
+	} else {
+		switch_find_local_ip(ip_buf, sizeof(ip_buf), AF_INET);
 	}
 
 	switch_core_new_memory_pool(&pool);



More information about the Freeswitch-svn mailing list