]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Move zombie session.(cc|hh) to webserver.hh 1345/head
authorChristian Hofstaedtler <christian@hofstaedtler.name>
Tue, 25 Mar 2014 17:15:17 +0000 (18:15 +0100)
committerChristian Hofstaedtler <christian@hofstaedtler.name>
Tue, 25 Mar 2014 17:15:17 +0000 (18:15 +0100)
pdns/Makefile.am
pdns/communicator.cc
pdns/dist-recursor
pdns/mastercommunicator.cc
pdns/session.cc [deleted file]
pdns/session.hh [deleted file]
pdns/slavecommunicator.cc
pdns/webserver.cc
pdns/webserver.hh
pdns/ws-recursor.hh

index 7db34f728c4cb11f82fa37e35de3b42ac7da1206..055224cdf51b03ef1d02af5fc06df8eb149acc22 100644 (file)
@@ -46,7 +46,7 @@ dns.hh dnsbackend.hh dnsbackend.cc dnspacket.hh dynmessenger.hh lock.hh logger.h
 nameserver.hh packetcache.hh packethandler.hh qtype.hh statbag.hh \
 ueberbackend.hh pdns.conf-dist \
 ws-auth.hh ws-auth.cc ws-api.cc ws-api.hh webserver.cc webserver.hh \
-session.cc session.hh misc.cc misc.hh receiver.cc ueberbackend.cc \
+misc.cc misc.hh receiver.cc ueberbackend.cc \
 dynlistener.cc dynlistener.hh  dynhandler.cc dynhandler.hh  \
 resolver.hh resolver.cc slavecommunicator.cc mastercommunicator.cc communicator.cc communicator.hh dnsproxy.cc \
 dnsproxy.hh unix_utility.cc common_startup.cc \
@@ -293,7 +293,7 @@ dns_random.cc \
 lua-pdns.cc lua-pdns.hh lua-recursor.cc lua-recursor.hh randomhelper.cc  \
 recpacketcache.cc recpacketcache.hh dns.cc nsecrecords.cc base32.cc cachecleaner.hh \
 ws-recursor.cc ws-recursor.hh ws-api.cc ws-api.hh webserver.cc webserver.hh \
-session.cc session.hh json.cc json.hh version.hh version.cc responsestats.cc
+json.cc json.hh version.hh version.cc responsestats.cc
 
 pdns_recursor_LDFLAGS= $(LUA_LIBS)
 pdns_recursor_LDADD= $(POLARSSL_LIBS) $(YAHTTP_LIBS)
index 34be6a54cb3aea706fd1d202ed28dbaf41d4dfbe..40aa9e1b5505cca0642b21f13069f3e913d0bea3 100644 (file)
@@ -32,7 +32,6 @@
 #include "logger.hh"
 #include "dns.hh"
 #include "arguments.hh"
-#include "session.hh"
 #include "packetcache.hh"
 #include <boost/lexical_cast.hpp>
 
index ed0a328050ae05a4ec22fa06ae2841964bc52f94..5706840846f6a3255181a14776966c530c3884af 100755 (executable)
@@ -27,7 +27,7 @@ mplexer.hh \
 dns_random.hh lua-pdns.hh lua-recursor.hh namespaces.hh \
 recpacketcache.hh base32.hh cachecleaner.hh json.hh version.hh \
 ws-recursor.hh ws-api.hh \
-responsestats.hh webserver.hh session.hh"
+responsestats.hh webserver.hh"
 
 CFILES="syncres.cc  misc.cc unix_utility.cc qtype.cc \
 logger.cc arguments.cc  lwres.cc pdns_recursor.cc  \
@@ -37,7 +37,7 @@ selectmplexer.cc epollmplexer.cc kqueuemplexer.cc portsmplexer.cc pdns_hw.cc \
 sillyrecords.cc lua-pdns.cc lua-recursor.cc randomhelper.cc \
 devpollmplexer.cc recpacketcache.cc dns.cc reczones.cc base32.cc nsecrecords.cc \
 dnslabeltext.cc json.cc ws-recursor.cc ws-api.cc version.cc dns_random.cc \
-responsestats.cc webserver.cc session.cc"
+responsestats.cc webserver.cc"
 
 cd docs
 make pdns_recursor.1 rec_control.1
index 8da8dade3a8aaa1f45b599cb1f89d9e823e44dbe..047252233f667f0ccd29ba1497085a375c44a521 100644 (file)
@@ -34,7 +34,6 @@
 #include "logger.hh"
 #include "dns.hh"
 #include "arguments.hh"
-#include "session.hh"
 #include "packetcache.hh"
 #include <boost/lexical_cast.hpp>
 
diff --git a/pdns/session.cc b/pdns/session.cc
deleted file mode 100644 (file)
index ce7ac43..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-    PowerDNS Versatile Database Driven Nameserver
-    Copyright (C) 2002 - 2014 PowerDNS.COM BV
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License version 2
-    as published by the Free Software Foundation
-
-    Additionally, the license of this program contains a special
-    exception which allows to distribute the program in binary form when
-    it is linked against OpenSSL.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-#include "utility.hh"
-#include "session.hh"
-#include "pdnsexception.hh"
-#include "misc.hh"
-#include <cstring>
-#include <iostream>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sstream>
-#include "misc.hh"
-#include "iputils.hh"
-
-Socket* Server::accept()
-{
-  return d_server_socket.accept();
-}
diff --git a/pdns/session.hh b/pdns/session.hh
deleted file mode 100644 (file)
index 7a32a38..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-    PowerDNS Versatile Database Driven Nameserver
-    Copyright (C) 2002 - 2014  PowerDNS.COM BV
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License version 2
-    as published by the Free Software Foundation
-
-    Additionally, the license of this program contains a special
-    exception which allows to distribute the program in binary form when
-    it is linked against OpenSSL.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-#ifndef SESSION_HH
-#define SESSION_HH
-
-#include <string>
-#include <cerrno>
-
-#include <sys/stat.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-#include <sys/types.h>
-#include <strings.h>
-
-#include "sstuff.hh"
-#include "iputils.hh"
-#include "mplexer.hh"
-#include "syncres.hh"
-
-
-//! The server class can be used to create listening servers
-class Server
-{
-public:
-  Server(const string &localaddress, int port) : d_local(localaddress.empty() ? "0.0.0.0" : localaddress, port), d_server_socket(InterNetwork, Stream, 0) {
-    d_server_socket.setReuseAddr();
-    d_server_socket.bind(d_local);
-    d_server_socket.listen();
-  }
-
-  ComboAddress d_local;
-
-  Socket *accept(); //!< Call accept() in an endless loop to accept new connections
-
-protected:
-  Socket d_server_socket;
-};
-
-#endif /* SESSION_HH */
index 0dc932eb1b76909168dc9a4f0ed9d0209bf1d143..9ccbdbc55329690f83f98aa75bf22e1a0b40fc13 100644 (file)
@@ -35,7 +35,6 @@
 #include "logger.hh"
 #include "dns.hh"
 #include "arguments.hh"
-#include "session.hh"
 #include "packetcache.hh"
 #include <boost/foreach.hpp>
 #include <boost/lexical_cast.hpp>
index 09a177403a8d0ec04dce8eb487664645c4b43277..478dcfd3fff5ded8c0dc239d44a29f409f561e62 100644 (file)
@@ -21,7 +21,6 @@
 */
 #include "utility.hh"
 #include "webserver.hh"
-#include "session.hh"
 #include "misc.hh"
 #include <vector>
 #include "logger.hh"
index 1c046420b6bf8d30c0d3baf231723415118ba34c..f627376b55542fbe0d468e4c487fe46381b039af 100644 (file)
@@ -31,7 +31,6 @@
 #include "rapidjson/writer.h"
 #include "namespaces.hh"
 #include "sstuff.hh"
-#include "session.hh"
 
 class HttpRequest : public YaHTTP::Request {
 public:
@@ -106,6 +105,25 @@ public:
   }
 };
 
+class Server
+{
+public:
+  Server(const string &localaddress, int port) : d_local(localaddress.empty() ? "0.0.0.0" : localaddress, port), d_server_socket(InterNetwork, Stream, 0) {
+    d_server_socket.setReuseAddr();
+    d_server_socket.bind(d_local);
+    d_server_socket.listen();
+  }
+
+  ComboAddress d_local;
+
+  Socket *accept() {
+    return d_server_socket.accept();
+  }
+
+protected:
+  Socket d_server_socket;
+};
+
 class WebServer : public boost::noncopyable
 {
 public:
index a8052a5378e5ba35b32621551e7efbc318e18b2b..ffcad3063628c46232acb960473e523108b64432 100644 (file)
@@ -22,7 +22,6 @@
 #include <boost/utility.hpp> 
 #include "namespaces.hh"
 #include "mplexer.hh"
-#include "session.hh"
 #include "webserver.hh"
 
 class HttpRequest;