]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/listsub/serv_listsub.c
CURL: make log output configurable.
[citadel.git] / citadel / modules / listsub / serv_listsub.c
index 6823260cdfa0856451863ddcf4718cc97266603a..a233e6c0e4d349a1b2c0c634fc46a24a40e3285d 100644 (file)
@@ -1,23 +1,21 @@
 /*
- * $Id$
- *
  * This module handles self-service subscription/unsubscription to mail lists.
  *
- * Copyright (c) 2002-2009 by the citadel.org team
+ * Copyright (c) 2002-2012 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 open source software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 3.
+ *  
+ *  
  *
  *  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
+ *  
+ *  
+ *  
  *
  */
 
@@ -53,7 +51,6 @@
 #include "support.h"
 #include "config.h"
 #include "user_ops.h"
-#include "policy.h"
 #include "database.h"
 #include "msgbase.h"
 #include "internet_addressing.h"
@@ -382,18 +379,16 @@ void do_confirm(char *room, char *token) {
        int line_length;
        char buf[512];
        char cmd[256];
-       char email[256];
+       char email[256] = "";
        char subtype[128];
        int success = 0;
-       char address_to_unsubscribe[256];
+       char address_to_unsubscribe[256] = "";
        char scancmd[256];
        char scanemail[256];
        char *holdbuf = NULL;
        int linelen = 0;
        int buflen = 0;
 
-       strcpy(address_to_unsubscribe, "");
-
        if (CtdlGetRoom(&qrbuf, room) != 0) {
                cprintf("%d There is no list called '%s'\n",
                        ERROR + ROOM_NOT_FOUND, room);
@@ -518,7 +513,7 @@ void do_confirm(char *room, char *token) {
         */
        if (success) {
                cprintf("%d %d operation(s) confirmed.\n", CIT_OK, success);
-               CtdlLogPrintf(CTDL_NOTICE, 
+               syslog(LOG_NOTICE, 
                        "Mailing list: %s %ssubscribed to %s with token %s\n", 
                        email, 
                        (!IsEmptyStr(address_to_unsubscribe)) ? "un" : "", 
@@ -587,6 +582,6 @@ CTDL_MODULE_INIT(listsub)
                CtdlRegisterProtoHook(cmd_subs, "SUBS", "List subscribe/unsubscribe");
        }
        
-       /* return our Subversion id for the Log */
-       return "$Id$";
+       /* return our module name for the log */
+       return "listsub";
 }