]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/socket.cpp
Remove the -Dssize_t declaration now its typedeffed.
[user/henk/code/inspircd.git] / src / socket.cpp
index 9ec6c9982304938726d9aebaa954c71be74242a8..efe799bfc746f3436faa724172987e6bfd45a1a3 100644 (file)
@@ -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;
                                        }
                                }
                        }