summaryrefslogtreecommitdiffstats
path: root/src/Server
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-09-11 23:13:23 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-09-11 23:13:23 +0200
commit09b8df5200de1c8c20ea2856a8c6aa76b0811bd1 (patch)
treee91d8f58a03671b70f5d1a30cfa6e3ca090ae690 /src/Server
parent781b6e65053cd1bd703ee1f254d93bc13648e21d (diff)
downloadmad-09b8df5200de1c8c20ea2856a8c6aa76b0811bd1.tar
mad-09b8df5200de1c8c20ea2856a8c6aa76b0811bd1.zip
Connection: Allow setting a receive limit
Diffstat (limited to 'src/Server')
-rw-r--r--src/Server/ConnectionManager.cpp17
-rw-r--r--src/Server/ConnectionManager.h2
2 files changed, 3 insertions, 16 deletions
diff --git a/src/Server/ConnectionManager.cpp b/src/Server/ConnectionManager.cpp
index ad5a7d3..1ffd3f1 100644
--- a/src/Server/ConnectionManager.cpp
+++ b/src/Server/ConnectionManager.cpp
@@ -64,23 +64,12 @@ boost::shared_ptr<const Common::AuthContext> ConnectionManager::ServerConnection
authContext = application->getAuthManager()->authenticate(method, subMethod, user, data, response, authContext);
- return authContext;
-}
-
-/*void* ConnectionManager::ServerConnection::getCertificate(size_t *size) const {
- const gnutls_datum_t *cert = connection->getCertificate();
+ if(authContext->isAuthenticated())
+ connection->setReceiveLimit(0xFFFFFFFF); // 4 Gigs
- *size = cert->size;
- return cert->data;
+ return authContext;
}
-void* ConnectionManager::ServerConnection::getPeerCertificate(size_t *size) const {
- const gnutls_datum_t *cert = connection->getPeerCertificate();
-
- *size = cert->size;
- return cert->data;
-}*/
-
boost::asio::ip::tcp::endpoint ConnectionManager::parseAddress(const std::string &str) throw(Core::Exception) {
try {
if(str == "*")
diff --git a/src/Server/ConnectionManager.h b/src/Server/ConnectionManager.h
index 099072c..8c989b9 100644
--- a/src/Server/ConnectionManager.h
+++ b/src/Server/ConnectionManager.h
@@ -73,8 +73,6 @@ class MAD_SERVER_EXPORT ConnectionManager : public Core::Configurable, private b
bool isConnected() const;
virtual bool disconnect();
- //virtual void* getCertificate(size_t *size) const;
- //virtual void* getPeerCertificate(size_t *size) const;
ConnectionType getConnectionType() const {
return type;