Modified: freeswitch/trunk/src/switch_core.c (14725 => 14726)
--- freeswitch/trunk/src/switch_core.c 2009-09-01 20:49:13 UTC (rev 14725)
+++ freeswitch/trunk/src/switch_core.c 2009-09-01 20:55:09 UTC (rev 14726)
@@ -1160,6 +1160,7 @@
char *dir_path;
int mask = 0;
struct in_addr in;
+ char hostname[256] = "";
memset(&runtime, 0, sizeof(runtime));
@@ -1219,6 +1220,9 @@
runtime.console = stdout;
}
+ gethostname(hostname, sizeof(hostname));
+ switch_core_set_variable("hostname", hostname);
+
switch_find_local_ip(guess_ip, sizeof(guess_ip), &mask, AF_INET);
switch_core_set_variable("local_ip_v4", guess_ip);
in.s_addr = mask;