new_socket:
while(globals.running) {
switch_clear_flag_locked(profile, PFLAG_RESPAWN);
- rv = switch_sockaddr_info_get(&sa, profile->ip, SWITCH_INET, profile->port, 0, tmp_pool);
+ rv = switch_sockaddr_info_get(&sa, profile->ip, SWITCH_UNSPEC, profile->port, 0, tmp_pool);
if (rv)
goto fail;
rv = switch_socket_create(&profile->sock, switch_sockaddr_get_family(sa), SOCK_STREAM, SWITCH_PROTO_TCP, tmp_pool);
profile->domain = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "ip")) {
if (!profile->ip || strcmp(val, profile->ip)) {
- profile->ip = switch_core_strdup(profile->pool, val);
+ profile->ip = switch_core_strdup(profile->pool, zstr(val) ? NULL : val);
switch_set_flag_locked(profile, PFLAG_SHOULD_RESPAWN);
}
} else if (!strcasecmp(var, "port")) {