diff --git a/activation.cpp b/activation.cpp index b7b3d42..3d46fe0 100644 --- a/activation.cpp +++ b/activation.cpp @@ -77,6 +77,16 @@ web::json::value get_dns() return web::json::value::string(tmp); } +web::json::value get_hostname() +{ + utility::string_t tmp; + + std::string hostName = net_get_hostname(); + tmp = utility::conversions::convertstring(hostName); + + return web::json::value::string(tmp); +} + bool getVersion(web::json::value& value) { std::string version; @@ -202,6 +212,9 @@ bool get_activation_payload(web::json::value& payload) // get DNS Info activationParams[U("fqdn")] = get_dns(); + // get hostname + activationParams[U("hostname")] = get_hostname(); + // get client string if (!get_client_string(value)) return false; activationParams[U("client")] = value; @@ -290,3 +303,4 @@ bool act_create_response(std::string payload, std::string& response) return true; } +