From 7df93fdeaaa348498be8896b1dc89ddb870ee9ad Mon Sep 17 00:00:00 2001 From: Gavin Halliday Date: Tue, 26 Sep 2023 13:08:37 +0100 Subject: [PATCH] HPCC-30358 Avoid converting local hostname to a blank string Signed-off-by: Gavin Halliday --- system/jlib/jsocket.cpp | 1 - system/jlib/jstring.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/system/jlib/jsocket.cpp b/system/jlib/jsocket.cpp index f246cc8769f..420487f3afa 100644 --- a/system/jlib/jsocket.cpp +++ b/system/jlib/jsocket.cpp @@ -3598,7 +3598,6 @@ bool IpAddress::ipset(const char *text) { if (text&&*text) { if ((text[0]=='.')&&(text[1]==0)) { - hostname.set(GetCachedHostName()); // Is this better than '.'? ipset(queryHostIP()); return true; } diff --git a/system/jlib/jstring.cpp b/system/jlib/jstring.cpp index b54d30e4838..fc8fc9c20d1 100644 --- a/system/jlib/jstring.cpp +++ b/system/jlib/jstring.cpp @@ -1434,7 +1434,7 @@ StringAttr& StringAttr::operator = (StringAttr && from) StringAttr& StringAttr::operator = (const StringAttr & from) { - set(from.str()); + set(from.get()); return *this; }