X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=server.cpp;h=72664e33f665eda4bd09e49d22789e546b4ee81f;hp=9ff4758493abf06d4268fc3a1fd5e54087366408;hb=b757a4a2ce9d24835b52a185134835762af2f50c;hpb=1c4ef2d6d366e5539b98b408d797657ca8a17bc0 diff --git a/server.cpp b/server.cpp index 9ff4758..72664e3 100644 --- a/server.cpp +++ b/server.cpp @@ -149,7 +149,7 @@ void Server::do_work() // If this client doesn't exist anymore, just ignore it // (it was deleted earlier). - std::map::iterator client_it = clients.find(connect_time_and_fd.second); + map::iterator client_it = clients.find(connect_time_and_fd.second); if (client_it == clients.end()) { clients_ordered_by_connect_time.pop(); continue; @@ -286,7 +286,7 @@ void Server::add_client_from_serialized(const ClientProto &client) } } -int Server::lookup_stream_by_url(const std::string &url) const +int Server::lookup_stream_by_url(const string &url) const { map::const_iterator url_it = url_map.find(url); if (url_it == url_map.end()) { @@ -472,7 +472,7 @@ sending_header_or_error_again: Stream *stream = client->stream; if (client->stream_pos == size_t(-2)) { // Start sending from the beginning of the backlog. - client->stream_pos = std::min( + client->stream_pos = min( stream->bytes_received - stream->backlog_size, 0); client->state = Client::SENDING_DATA;