]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/socket.cpp
Commit patch from danieldg that makes a ton of stuff const-safe for latest warn-happy...
[user/henk/code/inspircd.git] / src / socket.cpp
index b9e22c94903c1f79b891de20fcc18ff555a52f8c..81f2a6f27d8a3509cc8b4ab958ddd3871fe22271 100644 (file)
@@ -309,7 +309,7 @@ bool irc::sockets::MatchCIDR(const char* address, const char* cidr_mask, bool ma
  * It can only bind to IP addresses, if you wish to bind to hostnames
  * you should first resolve them using class 'Resolver'.
  */ 
-bool InspIRCd::BindSocket(int sockfd, int port, char* addr, bool dolisten)
+bool InspIRCd::BindSocket(int sockfd, int port, const char* addr, bool dolisten)
 {
        /* We allocate 2 of these, because sockaddr_in6 is larger than sockaddr (ugh, hax) */
        sockaddr* servaddr = new sockaddr[2];
@@ -318,7 +318,7 @@ bool InspIRCd::BindSocket(int sockfd, int port, char* addr, bool dolisten)
        int ret, size;
 
        if (*addr == '*')
-               *addr = 0;
+               addr = "";
 
 #ifdef IPV6
        if (*addr)