]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/dns.cpp
Added some missing parameter checking in m_swhois
[user/henk/code/inspircd.git] / src / dns.cpp
index 99b156bf13a21dfd2c0c0ac8ac9c30649da1e26c..fab9631b79baca213f072c1307730111b8397ea3 100644 (file)
@@ -29,6 +29,7 @@ looks like this, walks like this or tastes like this.
 #include <arpa/inet.h>
 #else
 #include "inspircd_win32wrapper.h"
+#include "inspircd_se_config.h"
 #endif
 
 #include "dns.h"
@@ -623,8 +624,7 @@ DNSResult DNS::GetResult()
 #endif
        const char* ipaddr_from;
        unsigned short int port_from = 0;
-
-       int length = recvfrom(this->GetFd(),(char*)buffer,sizeof(DNSHeader),0,from,&x);
+       int length = _recvfrom(this->GetFd(),(char*)buffer,sizeof(DNSHeader),0,from,&x);
 
        /* Did we get the whole header? */
        if (length < 12)
@@ -756,7 +756,7 @@ DNSResult DNS::GetResult()
                                 * as the last parameter on the line with a value ":1".
                                 */
                                if (*formatted == ':')
-                                       resultstr = "0" + resultstr;
+                                       resultstr.insert(0, "0");
                        }
                        break;