Commit 485293de authored by Ziran Sun's avatar Ziran Sun Committed by Uze Choi

checking on empty host case in OCResource::setHost().

Change-Id: Ia3cb2fb34e6b64ad4a5874bf49045550f4c5426c
Signed-off-by: default avatarZiran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20391Reviewed-by: default avatarMushfiqul Islam <i.mushfiq@samsung.com>
Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
parent 2928fbfc
......@@ -203,6 +203,12 @@ OCResource::~OCResource()
std::string OCResource::setHost(const std::string& host)
{
if (!host.length())
{
throw ResourceInitException(m_uri.empty(), m_resourceTypes.empty(),
m_interfaces.empty(), m_clientWrapper.expired(), false, false);
}
size_t prefix_len;
OCDevAddr new_devAddr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment