summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuboš Doležel <lubos@dolezel.info>2020-02-23 09:38:44 +0100
committerGitHub <noreply@github.com>2020-02-23 09:38:44 +0100
commitfb3ce9952b04259b04d33587e19cdf344dae3a26 (patch)
treeb870c91ebd94f65d65e32fa7e33a5d8f56580a67
parentcbd8359e70149d1f47385883498f5d98723e43f2 (diff)
parenta5b81c715d331ef2c799eaf20c10e384355c5667 (diff)
downloadtwinkle-fb3ce9952b04259b04d33587e19cdf344dae3a26.tar
twinkle-fb3ce9952b04259b04d33587e19cdf344dae3a26.tar.gz
twinkle-fb3ce9952b04259b04d33587e19cdf344dae3a26.tar.lz
twinkle-fb3ce9952b04259b04d33587e19cdf344dae3a26.tar.xz
twinkle-fb3ce9952b04259b04d33587e19cdf344dae3a26.zip
Merge pull request #160 from 4-FLOSS-Free-Libre-Open-Source-Software/patch-2
resolve nat_public_ip hostname for dyndns to work
-rw-r--r--src/phone_user.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/phone_user.cpp b/src/phone_user.cpp
index 5cac223..fded2b5 100644
--- a/src/phone_user.cpp
+++ b/src/phone_user.cpp
@@ -1499,7 +1499,7 @@ bool t_phone_user::get_last_reg_failed(void) const {
string t_phone_user::get_ip_sip(const string &auto_ip) const {
if (stun_public_ip_sip) return h_ip2str(stun_public_ip_sip);
- if (user_config->get_use_nat_public_ip()) return user_config->get_nat_public_ip();
+ if (user_config->get_use_nat_public_ip()) return h_ip2str(gethostbyname(user_config->get_nat_public_ip()));
if (LOCAL_IP == AUTO_IP4_ADDRESS) return auto_ip;
return LOCAL_IP;
}