aboutsummaryrefslogtreecommitdiffstats
path: root/src/socket.cpp
diff options
context:
space:
mode:
authorGravatar brain2006-07-09 20:41:36 +0000
committerGravatar brain2006-07-09 20:41:36 +0000
commit6a831a13ce816907bbf4b3a0a76c449a59972983 (patch)
tree6c9820913148a41ecd3c35fe3e8b7b5a06bc0e24 /src/socket.cpp
parentWhack a space indent (diff)
FEAR THE POWER OF VIM AND THE ALMIGHTY "%s/ /\t/g"
git-svn-id: http://svn.inspircd.org/repository/branches/1_0_stable@4249 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 53a26eca8..a831d8060 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -3,13 +3,13 @@
* +------------------------------------+
*
* InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- * E-mail:
- * <brain@chatspike.net>
- * <Craig@chatspike.net>
+ * E-mail:
+ * <brain@chatspike.net>
+ * <Craig@chatspike.net>
*
* Written by Craig Edwards, Craig McLure, and others.
* This program is free but copyrighted software; see
- * the file COPYING for details.
+ * the file COPYING for details.
*
* ---------------------------------------------------
*/
@@ -74,7 +74,7 @@ InspSocket::InspSocket(const std::string &ahost, int aport, bool listening, unsi
this->state = I_ERROR;
this->OnError(I_ERR_SOCKET);
log(DEBUG,"OpenTCPSocket() error");
- return;
+ return;
}
else
{
@@ -110,7 +110,7 @@ InspSocket::InspSocket(const std::string &ahost, int aport, bool listening, unsi
this->dns.SetNS(std::string(Config->DNSServer));
this->dns.ForwardLookupWithFD(host,fd);
timeout_end = time(NULL) + maxtime;
- timeout = false;
+ timeout = false;
this->state = I_RESOLVING;
socket_ref[this->fd] = this;
}
@@ -126,7 +126,7 @@ InspSocket::InspSocket(const std::string &ahost, int aport, bool listening, unsi
void InspSocket::SetQueues(int nfd)
{
- // attempt to increase socket sendq and recvq as high as its possible
+ // attempt to increase socket sendq and recvq as high as its possible
int sendbuf = 32768;
int recvbuf = 32768;
setsockopt(nfd,SOL_SOCKET,SO_SNDBUF,(const void *)&sendbuf,sizeof(sendbuf));
@@ -190,9 +190,9 @@ bool InspSocket::BindAddr()
/* If they gave a hostname, bind to the IP it resolves to */
log(DEBUG,"Resolving host %s",IP.c_str());
if (CleanAndResolve(resolved_addr, IP.c_str(), true))
- {
+ {
log(DEBUG,"Resolved host %s to %s",IP.c_str(),resolved_addr);
- IP = resolved_addr;
+ IP = resolved_addr;
}
}
@@ -276,11 +276,11 @@ void InspSocket::Close()
if (this->fd != -1)
{
this->OnClose();
- shutdown(this->fd,2);
- close(this->fd);
+ shutdown(this->fd,2);
+ close(this->fd);
socket_ref[this->fd] = NULL;
this->ClosePending = true;
- this->fd = -1;
+ this->fd = -1;
}
}