Force unique stream name, use name as id

This commit is contained in:
badaix 2016-11-09 10:25:26 +01:00
parent d76aac0de7
commit 341466ceb5
7 changed files with 32 additions and 39 deletions

View file

@ -41,15 +41,6 @@ StreamUri::StreamUri(const std::string& streamUri)
string decodedUri = uriDecode(uri);
logD << "StreamUri: " << decodedUri << "\n";
id_ = decodedUri;
pos = id_.find('?');
if (pos != string::npos)
id_ = id_.substr(0, pos);
pos = id_.find('#');
if (pos != string::npos)
id_ = id_.substr(0, pos);
logD << "id: '" << id_ << "'\n";
string tmp(decodedUri);
pos = tmp.find(':');
@ -98,8 +89,6 @@ StreamUri::StreamUri(const std::string& streamUri)
string key = trim_copy(kv.substr(0, pos));
string value = trim_copy(kv.substr(pos+1));
query[key] = value;
if (key == "id")
id_ = value;
}
}
}
@ -119,12 +108,6 @@ json StreamUri::toJson() const
}
std::string StreamUri::id() const
{
return id_;
}
std::string StreamUri::getQuery(const std::string& key, const std::string& def) const
{
auto iter = query.find(key);