X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=server.cpp;h=a2f28e62a1d5ca370194fcd58b4f72bc97473e30;hp=b381e7947d6d53d670042758cde01c7126b26738;hb=5cc8cd703a637e276c2595953878fd9561592bfa;hpb=b9d939606ebaf69e2c5a5d8b3e2d8e9adc0e69ae diff --git a/server.cpp b/server.cpp index b381e79..a2f28e6 100644 --- a/server.cpp +++ b/server.cpp @@ -19,7 +19,6 @@ #include "accesslog.h" #include "log.h" -#include "markpool.h" #include "metacube2.h" #include "mutexlock.h" #include "parse.h" @@ -254,14 +253,6 @@ void Server::set_header(int stream_index, const string &http_header, const strin streams[stream_index]->stream_header = stream_header; } -void Server::set_mark_pool(int stream_index, MarkPool *mark_pool) -{ - MutexLock lock(&mutex); - assert(clients.empty()); - assert(stream_index >= 0 && stream_index < ssize_t(streams.size())); - streams[stream_index]->mark_pool = mark_pool; -} - void Server::set_pacing_rate(int stream_index, uint32_t pacing_rate) { MutexLock lock(&mutex); @@ -516,16 +507,6 @@ int Server::parse_request(Client *client) client->url = request_tokens[1]; client->stream = stream; - if (client->stream->mark_pool != NULL) { - client->fwmark = client->stream->mark_pool->get_mark(); - } else { - client->fwmark = 0; // No mark. - } - if (setsockopt(client->sock, SOL_SOCKET, SO_MARK, &client->fwmark, sizeof(client->fwmark)) == -1) { - if (client->fwmark != 0) { - log_perror("setsockopt(SO_MARK)"); - } - } if (setsockopt(client->sock, SOL_SOCKET, SO_MAX_PACING_RATE, &client->stream->pacing_rate, sizeof(client->stream->pacing_rate)) == -1) { if (client->stream->pacing_rate != ~0U) { log_perror("setsockopt(SO_MAX_PACING_RATE)"); @@ -612,10 +593,6 @@ void Server::close_client(Client *client) if (client->stream != NULL) { delete_from(&client->stream->sleeping_clients, client); delete_from(&client->stream->to_process, client); - if (client->stream->mark_pool != NULL) { - int fwmark = client->fwmark; - client->stream->mark_pool->release_mark(fwmark); - } } // Log to access_log.