comparison Core/HttpServer/MongooseServer.cpp @ 899:bb0a51561016 plugins

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 18 Jun 2014 13:29:09 +0200
parents c4053ac5db04
children 7d88f3f4a3b3
comparison
equal deleted inserted replaced
898:7000fc86fe62 899:bb0a51561016
841 pimpl_->context_ = NULL; 841 pimpl_->context_ = NULL;
842 } 842 }
843 } 843 }
844 844
845 845
846 void MongooseServer::RegisterHandler(HttpHandler* handler) 846 void MongooseServer::RegisterHandler(HttpHandler& handler)
847 { 847 {
848 Stop(); 848 Stop();
849 849
850 handlers_.push_back(handler); 850 handlers_.push_back(&handler);
851 } 851 }
852 852
853 853
854 void MongooseServer::ClearHandlers() 854 void MongooseServer::ClearHandlers()
855 { 855 {
856 Stop(); 856 Stop();
857
858 for (Handlers::iterator it =
859 handlers_.begin(); it != handlers_.end(); ++it)
860 {
861 delete *it;
862 }
863 } 857 }
864 858
865 859
866 void MongooseServer::ClearUsers() 860 void MongooseServer::ClearUsers()
867 { 861 {