+2004-07-21 Michael Poole <mdpoole@troilus.org>
+
+ * include/client.h, ircd/ircd_auth.c, ircd/ircd_crypt_smd5.c,
+ ircd/ircd_reslib.c: Fix warnings from gcc -pedantic.
+
2004-07-21 Michael Poole <mdpoole@troilus.org>
New DNS resolver code, courtesy of Dianora and the rest of the
struct name \
{ \
unsigned long bits[((max + FLAGSET_NBITS - 1) / FLAGSET_NBITS)]; \
- };
+ }
#define FLAGSET_ISSET(set,flag) ((set).bits[FLAGSET_INDEX(flag)] & FLAGSET_MASK(flag))
#define FLAGSET_SET(set, flag) (set).bits[FLAGSET_INDEX(flag)] |= FLAGSET_MASK(flag)
struct IAuth *iauth_active;
-static const struct IAuthCmd iauth_cmdtab[];
-
static void iauth_write(struct IAuth *iauth);
static void iauth_reconnect(struct IAuth *iauth);
static void iauth_disconnect(struct IAuth *iauth);
static void iauth_sock_callback(struct Event *ev);
static void iauth_send_request(struct IAuth *iauth, struct IAuthRequest *iar);
static void iauth_dispose_request(struct IAuth *iauth, struct IAuthRequest *iar);
+static void iauth_cmd_doneauth(struct IAuth *iauth, int argc, char *argv[]);
+static void iauth_cmd_badauth(struct IAuth *iauth, int argc, char *argv[]);
+
+static const struct IAuthCmd iauth_cmdtab[] = {
+ { "DoneAuth", iauth_cmd_doneauth },
+ { "BadAuth", iauth_cmd_badauth },
+ { NULL, NULL }
+};
struct IAuth *iauth_connect(char *host, unsigned short port, char *passwd, time_t reconnect, time_t timeout)
{
iauth_dispose_request(iauth, iar);
exit_client(client, client, &me, reason);
}
-
-static const struct IAuthCmd iauth_cmdtab[] = {
- { "DoneAuth", iauth_cmd_doneauth },
- { "BadAuth", iauth_cmd_badauth },
- { NULL, NULL }
-};
else
MD5Name(MD5Update)(&ctx, (unsigned const char *)key+j, 1);
- /* Now make the output string */
-// strcpy(passwd, magic);
-// strncat(passwd, sp, sl);
+ /* Now make the output string
+ strcpy(passwd, magic);
+ strncat(passwd, sp, sl); */
strncpy(passwd, sp, sl);
strcat(passwd, "$");
if ((n = irc_ns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1)
return(-1);
- if (irc_ns_name_ntop(tmp, dst, dstsiz) == -1)
+ if (irc_ns_name_ntop((char*)tmp, (char*)dst, dstsiz) == -1)
return(-1);
return(n);
}
}
*dn++ = '.';
}
- if ((l = labellen(cp - 1)) < 0) {
+ if ((l = labellen((const unsigned char*)(cp - 1))) < 0) {
errno = EMSGSIZE; /* XXX */
return(-1);
}
if (!isxdigit((*cp) & 0xff)) /* reject '\[x/BLEN]' */
return(EINVAL);
- for (tp = *dst + 1; cp < end && tp < eom; cp++) {
+ for (tp = (char*)(*dst + 1); cp < end && tp < eom; cp++) {
switch((c = *cp)) {
case ']': /* end of the bitstring */
if (afterslash) {
**dst = blen;
*bp = cp;
- *dst = tp;
+ *dst = (unsigned char*)tp;
return(0);
}