Use IOBuffer with its StrBuf + const char* inside instead of having two of them
[citadel.git] / citadel / modules / clamav / serv_virus.c
index e31638aee42a5935d4f67b2b754537eae6afe9af..e57435cb793beea6951b847d303f49f2948518cc 100644 (file)
@@ -115,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");
@@ -144,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);
         }
@@ -187,7 +187,7 @@ int clamd(struct CtdlMessage *msg) {
        }
 
 bail:  close(sock);
-       FreeStrBuf(&CCC->sReadBuf);
+       FreeStrBuf(&CCC->SBuf.Buf);
        FreeStrBuf(&CCC->sMigrateBuf);
        return(is_virus);
 }