]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/clamav/serv_virus.c
Use IOBuffer with its StrBuf + const char* inside instead of having two of them
[citadel.git] / citadel / modules / clamav / serv_virus.c
index ab77f1865d3b1c95875074aa187b9059f153abd4..e57435cb793beea6951b847d303f49f2948518cc 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $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
@@ -117,9 +115,9 @@ int clamd(struct CtdlMessage *msg) {
                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");
@@ -146,7 +144,7 @@ int clamd(struct CtdlMessage *msg) {
                /* 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);
         }
@@ -189,7 +187,7 @@ int clamd(struct CtdlMessage *msg) {
        }
 
 bail:  close(sock);
-       FreeStrBuf(&CCC->sReadBuf);
+       FreeStrBuf(&CCC->SBuf.Buf);
        FreeStrBuf(&CCC->sMigrateBuf);
        return(is_virus);
 }
@@ -204,5 +202,5 @@ CTDL_MODULE_INIT(virus)
        }
        
        /* return our Subversion id for the Log */
-        return "$Id$";
+        return "virus";
 }