From eb79a551d82b78bca3bb1eb2785bf480a73dd525 Mon Sep 17 00:00:00 2001 From: Neil Jensen Date: Mon, 11 Jan 2016 10:32:18 -0600 Subject: [PATCH] Make CivetAuthHandler::authorize function pure virtual --- include/CivetServer.h | 2 +- src/CivetServer.cpp | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/include/CivetServer.h b/include/CivetServer.h index 041648a8..42c6c66b 100644 --- a/include/CivetServer.h +++ b/include/CivetServer.h @@ -119,7 +119,7 @@ class CIVETWEB_API CivetAuthHandler * @param conn - the connection information * @returns true if authorization succeeded, false otherwise */ - virtual bool authorize(CivetServer *server, struct mg_connection *conn); + virtual bool authorize(CivetServer *server, struct mg_connection *conn) = 0; }; /** diff --git a/src/CivetServer.cpp b/src/CivetServer.cpp index 189416cf..405c2889 100644 --- a/src/CivetServer.cpp +++ b/src/CivetServer.cpp @@ -105,14 +105,6 @@ CivetWebSocketHandler::handleClose(CivetServer *server, return; } -bool -CivetAuthHandler::authorize(CivetServer *server, struct mg_connection *conn) -{ - UNUSED_PARAMETER(server); - UNUSED_PARAMETER(conn); - return false; -} - int CivetServer::requestHandler(struct mg_connection *conn, void *cbdata) { @@ -296,7 +288,7 @@ CivetServer::CivetServer(std::vector options, callbacks.connection_close = closeHandler; std::vector pointers(options.size()); - for (int i = 0; i < options.size(); i++) { + for (size_t i = 0; i < options.size(); i++) { pointers.push_back(options[i].c_str()); } pointers.push_back(0);