/*
- * $Id$
- *
* This module allows Citadel to use clamd to filter incoming messages
* arriving via SMTP. For more information on clamd, visit
* http://clamav.net (the ClamAV project is not in any way
extract_token(hostbuf, buf, 0, ':', sizeof hostbuf);
if (extract_token(portbuf, buf, 1, ':', sizeof portbuf)==-1)
/* Didn't specify a port so we'll try the psuedo-standard 3310 */
- sock = sock_connect(hostbuf, CLAMD_PORT, "tcp");
+ sock = sock_connect(hostbuf, CLAMD_PORT);
else
/* Port specified lets try connecting to it! */
- sock = sock_connect(hostbuf, portbuf, "tcp");
+ sock = sock_connect(hostbuf, portbuf);
if (sock >= 0) CtdlLogPrintf(CTDL_DEBUG, "Connected!\n");
}
return(0);
}
CCC=CC;
- CCC->sReadBuf = NewStrBuf();
+ CCC->SBuf.Buf = NewStrBuf();
CCC->sMigrateBuf = NewStrBuf();
- CCC->sPos = NULL;
+ CCC->SBuf.ReadWritePointer = NULL;
/* Command */
CtdlLogPrintf(CTDL_DEBUG, "Transmitting STREAM command\n");
extract_token(portbuf, buf, 1, ' ', sizeof portbuf);
/* Attempt to establish connection to STREAM socket */
- streamsock = sock_connect(hostbuf, portbuf, "tcp");
+ streamsock = sock_connect(hostbuf, portbuf);
if (streamsock < 0) {
/* If the service isn't running, just pass the mail
* through. Potentially throwing away mails isn't good.
*/
- FreeStrBuf(&CCC->sReadBuf);
+ FreeStrBuf(&CCC->SBuf.Buf);
FreeStrBuf(&CCC->sMigrateBuf);
return(0);
}
}
bail: close(sock);
- FreeStrBuf(&CCC->sReadBuf);
+ FreeStrBuf(&CCC->SBuf.Buf);
FreeStrBuf(&CCC->sMigrateBuf);
return(is_virus);
}
}
/* return our Subversion id for the Log */
- return "$Id$";
+ return "virus";
}