summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-14 20:13:00 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-14 20:13:00 +0000
commit00072a40bf8d9de91636885318c29ba890905017 (patch)
tree67fe42c024ac554e00dc31d207ae36f419f1cb89
parent854effd9c8ade1e58bb0c2c645d8d5c375a60714 (diff)
Force initialization of fd to -1
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3199 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/socket.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 836a2b5de..e43055260 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -46,6 +46,7 @@ InspSocket* socket_ref[MAX_DESCRIPTORS];
InspSocket::InspSocket()
{
this->state = I_DISCONNECTED;
+ this->fd = -1;
}
InspSocket::InspSocket(int newfd, char* ip)
@@ -59,6 +60,7 @@ InspSocket::InspSocket(int newfd, char* ip)
InspSocket::InspSocket(std::string host, int port, bool listening, unsigned long maxtime)
{
+ this->fd = -1;
if (listening) {
if ((this->fd = OpenTCPSocket()) == ERROR)
{