Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
home:yukoff:openSUSE:Leap:42.1:Backports
pdns
pdns-3.4.10-webserver-164689.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pdns-3.4.10-webserver-164689.patch of Package pdns
--- a/pdns/webserver.cc +++ a/pdns/webserver.cc @@ -32,8 +32,8 @@ #include <yahttp/router.hpp> struct connectionThreadData { - WebServer* webServer; - Socket* client; + WebServer* webServer{0}; + Socket* client{0}; }; void HttpRequest::json(rapidjson::Document& document) @@ -358,14 +358,31 @@ void WebServer::go() // data and data->client will be freed by thread connectionThreadData *data = new connectionThreadData; data->webServer = this; - data->client = d_server->accept(); - if (data->client->acl(acl)) { - pthread_create(&tid, 0, &WebServerConnectionThreadStart, (void *)data); - } else { - ComboAddress remote; - if (data->client->getRemote(remote)) - L<<Logger::Error<<"Webserver closing socket: remote ("<< remote.toString() <<") does not match 'webserver-allow-from'"<<endl; - delete data->client; // close socket + try { + data->client = d_server->accept(); + if (data->client->acl(acl)) { + pthread_create(&tid, 0, &WebServerConnectionThreadStart, (void *)data); + } else { + ComboAddress remote; + if (data->client->getRemote(remote)) + L<<Logger::Error<<"Webserver closing socket: remote ("<< remote.toString() <<") does not match 'webserver-allow-from'"<<endl; + delete data->client; // close socket + delete data; + } + } + catch(PDNSException &e) { + L<<Logger::Error<<"PDNSException while accepting a connection in main webserver thread: "<<e.reason<<endl; + delete data->client; + delete data; + } + catch(std::exception &e) { + L<<Logger::Error<<"STL Exception while accepting a connection in main webserver thread: "<<e.what()<<endl; + delete data->client; + delete data; + } + catch(...) { + L<<Logger::Error<<"Unknown exception while accepting a connection in main webserver thread"<<endl; + delete data->client; delete data; } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor