event/ServerSocket: pass AllocatedPath to AddPath()

This commit is contained in:
Max Kellermann
2013-10-19 17:40:56 +02:00
parent 7db124068f
commit 3274bb54ad
3 changed files with 21 additions and 16 deletions

View File

@@ -67,8 +67,9 @@ listen_add_config_param(unsigned int port,
if (0 == strcmp(param->value.c_str(), "any")) {
return listen_socket->AddPort(port, error_r);
} else if (param->value[0] == '/' || param->value[0] == '~') {
const auto path = config_parse_path(param, error_r);
return !path.IsNull() && listen_socket->AddPath(path.c_str(), error_r);
auto path = config_parse_path(param, error_r);
return !path.IsNull() &&
listen_socket->AddPath(std::move(path), error_r);
} else {
return listen_socket->AddHost(param->value.c_str(), port,
error_r);