X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsocket.cpp;h=efe799bfc746f3436faa724172987e6bfd45a1a3;hb=74066e0f563ef630e432d3bbb10544318b70ade3;hp=9ec6c9982304938726d9aebaa954c71be74242a8;hpb=8ed74be517990d100bdfe237a002d5115ea85a5e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/socket.cpp b/src/socket.cpp index 9ec6c9982..efe799bfc 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -93,11 +93,11 @@ int irc::sockets::OpenTCPSocket(const std::string& addr, int socktype) } else { - setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); + setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (char*)&on, sizeof(on)); /* This is BSD compatible, setting l_onoff to 0 is *NOT* http://web.irc.org/mla/ircd-dev/msg02259.html */ linger.l_onoff = 1; linger.l_linger = 1; - setsockopt(sockfd, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger)); + setsockopt(sockfd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(linger)); return (sockfd); } } @@ -144,16 +144,16 @@ int InspIRCd::BindPorts(FailedPortList &failed_ports) } if (!skip) { - ClientListenSocket *ll = new ClientListenSocket(portno, Addr); + ClientListenSocket *ll = new ClientListenSocket(portno, Addr, "clients", *Desc ? Desc : "plaintext"); if (ll->GetFd() > -1) { bound++; - ll->SetDescription(*Desc ? Desc : "plaintext"); ports.push_back(ll); } else { failed_ports.push_back(std::make_pair(bind_readable, strerror(errno))); + delete ll; } } }