]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/reslib.c
Yay for documenting code....
[irc/rqf/shadowircd.git] / src / reslib.c
index 4f2c57030ac817e4a00c7e0730fab0b31084b5b1..38c09ebdf6e5d874766507e70df74578e07fdc85 100644 (file)
@@ -86,8 +86,7 @@
 #include "ircd.h"
 #include "res.h"
 #include "reslib.h"
-#include "irc_string.h"
-#include "sprintf_irc.h"
+#include "match.h"
 
 #define NS_TYPE_ELT             0x40 /* EDNS0 extended label type */
 #define DNS_LABELTYPE_BITSTRING 0x41
@@ -98,7 +97,7 @@
 
 struct rb_sockaddr_storage irc_nsaddr_list[IRCD_MAXNS];
 int irc_nscount = 0;
-char irc_domain[HOSTLEN + 1];
+char irc_domain[IRCD_RES_HOSTLEN + 1];
 
 static const char digitvalue[256] = {
   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*16*/
@@ -209,7 +208,7 @@ parse_resvconf(void)
       *p = '\0';  /* take the first word */
 
     if (irccmp(opt, "domain") == 0)
-      strlcpy(irc_domain, arg, sizeof(irc_domain));
+      rb_strlcpy(irc_domain, arg, sizeof(irc_domain));
     else if (irccmp(opt, "nameserver") == 0)
       add_nameserver(arg);
   }
@@ -409,7 +408,7 @@ irc_ns_name_ntop(const char *src, char *dst, size_t dstsiz)
                        }
                        *dn++ = '.';
                }
-               if ((l = labellen((unsigned char*)(cp - 1))) < 0) {
+               if ((l = labellen((const unsigned char*)(cp - 1))) < 0) {
                        errno = EMSGSIZE; /* XXX */
                        return(-1);
                }