]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/spam/serv_spam.c
Use IOBuffer with its StrBuf + const char* inside instead of having two of them
[citadel.git] / citadel / modules / spam / serv_spam.c
index 3473a82d2a36f032e144d7da001b06abd42190d9..ad81f1217b3b650625ce8199d069a07c116c0591 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id$
- *
  * This module allows Citadel to use SpamAssassin to filter incoming messages
  * arriving via SMTP.  For more information on SpamAssassin, visit
  * http://www.spamassassin.org (the SpamAssassin project is not in any way
@@ -8,19 +6,19 @@
  *
  * Copyright (c) 1998-2009 by the citadel.org team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #define SPAMASSASSIN_PORT       "783"
@@ -106,9 +104,9 @@ int spam_assassin(struct CtdlMessage *msg) {
                return(0);
        }
 
-       CCC->sReadBuf = NewStrBuf();
+       CCC->SBuf.Buf = NewStrBuf();
        CCC->sMigrateBuf = NewStrBuf();
-       CCC->sPos = NULL;
+       CCC->SBuf.ReadWritePointer = NULL;
 
        /* Command */
        CtdlLogPrintf(CTDL_DEBUG, "Transmitting command\n");
@@ -190,7 +188,7 @@ int spam_assassin(struct CtdlMessage *msg) {
        }
 
 bail:  close(sock);
-       FreeStrBuf(&CCC->sReadBuf);
+       FreeStrBuf(&CCC->SBuf.Buf);
        FreeStrBuf(&CCC->sMigrateBuf);
        return(is_spam);
 }
@@ -205,5 +203,5 @@ CTDL_MODULE_INIT(spam)
        }
        
        /* return our Subversion id for the Log */
-        return "$Id$";
+        return "spam";
 }