summaryrefslogtreecommitdiffstats
path: root/src/Net
diff options
context:
space:
mode:
Diffstat (limited to 'src/Net')
-rw-r--r--src/Net/ClientConnection.cpp2
-rw-r--r--src/Net/Connection.cpp4
-rw-r--r--src/Net/FdManager.h2
-rw-r--r--src/Net/Listener.cpp2
-rw-r--r--src/Net/ServerConnection.cpp2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/Net/ClientConnection.cpp b/src/Net/ClientConnection.cpp
index 25673fd..75a9ad6 100644
--- a/src/Net/ClientConnection.cpp
+++ b/src/Net/ClientConnection.cpp
@@ -98,7 +98,7 @@ void ClientConnection::connect(const IPAddress &address, bool daemon0) throw(Com
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, x509_cred);
gnutls_transport_set_ptr(session, (gnutls_transport_ptr_t)sock);
- FdManager::getFdManager()->registerFd(sock, sigc::mem_fun(this, &Connection::sendReceive));
+ FdManager::get()->registerFd(sock, sigc::mem_fun(this, &Connection::sendReceive));
handshake();
}
diff --git a/src/Net/Connection.cpp b/src/Net/Connection.cpp
index 5454dcf..7f8d9a9 100644
--- a/src/Net/Connection.cpp
+++ b/src/Net/Connection.cpp
@@ -288,7 +288,7 @@ void Connection::doDisconnect() {
if(!isConnected())
return;
- FdManager::getFdManager()->unregisterFd(sock);
+ FdManager::get()->unregisterFd(sock);
shutdown(sock, SHUT_RDWR);
close(sock);
@@ -304,7 +304,7 @@ void Connection::updateEvents() const {
if(state == HANDSHAKE || state == BYE)
events = ((gnutls_record_get_direction(session) == 0) ? POLLIN : POLLOUT);
- FdManager::getFdManager()->setFdEvents(sock, events);
+ FdManager::get()->setFdEvents(sock, events);
}
}
diff --git a/src/Net/FdManager.h b/src/Net/FdManager.h
index 1308a79..2e6fc66 100644
--- a/src/Net/FdManager.h
+++ b/src/Net/FdManager.h
@@ -44,7 +44,7 @@ class FdManager {
public:
virtual ~FdManager();
- static FdManager *getFdManager() {return &fdManager;}
+ static FdManager *get() {return &fdManager;}
bool registerFd(int fd, const sigc::slot<void, short> &handler, short events = 0);
bool unregisterFd(int fd);
diff --git a/src/Net/Listener.cpp b/src/Net/Listener.cpp
index ed820d0..c4c5194 100644
--- a/src/Net/Listener.cpp
+++ b/src/Net/Listener.cpp
@@ -78,7 +78,7 @@ Listener::Listener(const std::string &x905CertFile0, const std::string &x905KeyF
throw Common::Exception("listen()", Common::Exception::INTERNAL_ERRNO, errno);
}
- FdManager::getFdManager()->registerFd(sock, sigc::mem_fun(this, &Listener::acceptHandler), POLLIN);
+ FdManager::get()->registerFd(sock, sigc::mem_fun(this, &Listener::acceptHandler), POLLIN);
}
Listener::~Listener() {
diff --git a/src/Net/ServerConnection.cpp b/src/Net/ServerConnection.cpp
index 05cc861..97e2ae4 100644
--- a/src/Net/ServerConnection.cpp
+++ b/src/Net/ServerConnection.cpp
@@ -73,7 +73,7 @@ ServerConnection::ServerConnection(int sock0, const IPAddress &address, gnutls_d
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, x509_cred);
gnutls_transport_set_ptr(session, (gnutls_transport_ptr_t)sock);
- FdManager::getFdManager()->registerFd(sock, sigc::mem_fun(this, &Connection::sendReceive));
+ FdManager::get()->registerFd(sock, sigc::mem_fun(this, &Connection::sendReceive));
handshake();
}