]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_listsub.c
centralized filename calculation
[citadel.git] / citadel / serv_listsub.c
index 8b21d379b7d0e020620971ead9bd9da3bd426282..638d6f8242d90edbfffbdb392fb83baaabf5100d 100644 (file)
@@ -3,7 +3,7 @@
  *
  * This module handles self-service subscription/unsubscription to mail lists.
  *
- * Copyright (C) 2002 by Art Cancro and others.
+ * Copyright (C) 2002-2005 by Art Cancro and others.
  * This code is released under the terms of the GNU General Public License.
  *
  */
@@ -85,7 +85,7 @@ void do_subscribe(char *room, char *email, char *subtype, char *webpage) {
        FILE *ncfp;
        char filename[256];
        char token[256];
-       char confirmation_request[512];
+       char confirmation_request[2048];
        char buf[512];
        char urlroom[ROOMNAMELEN];
        char scancmd[64];
@@ -106,7 +106,7 @@ void do_subscribe(char *room, char *email, char *subtype, char *webpage) {
 
        listsub_generate_token(token);
 
-       assoc_file_name(filename, sizeof filename, &qrbuf, "netconfigs");
+       assoc_file_name(filename, sizeof filename, &qrbuf, ctdl_netcfg_dir);
 
        /* 
         * Make sure the requested address isn't already subscribed
@@ -163,8 +163,8 @@ void do_subscribe(char *room, char *email, char *subtype, char *webpage) {
                "Someone (probably you) has submitted a request to subscribe\n"
                "&lt;%s&gt; to the <B>%s</B> mailing list.<BR><BR>\n"
                "Please click here to confirm this request:<BR>\n"
-               "<A HREF=\"http://%s?room=%s&token=%s&cmd=confirm\">"
-               "http://%s?room=%s&token=%s&cmd=confirm</A><BR><BR>\n"
+               "<A HREF=\"%s?room=%s&token=%s&cmd=confirm\">"
+               "%s?room=%s&token=%s&cmd=confirm</A><BR><BR>\n"
                "If this request has been submitted in error and you do not\n"
                "wish to receive the '%s' mailing list, simply do nothing,\n"
                "and you will not receive any further mailings.\n"
@@ -198,7 +198,7 @@ void do_unsubscribe(char *room, char *email, char *webpage) {
        char filename[256];
        char token[256];
        char buf[512];
-       char confirmation_request[512];
+       char confirmation_request[2048];
        char urlroom[ROOMNAMELEN];
        char scancmd[256];
        char scanemail[256];
@@ -219,7 +219,7 @@ void do_unsubscribe(char *room, char *email, char *webpage) {
 
        listsub_generate_token(token);
 
-       assoc_file_name(filename, sizeof filename, &qrbuf, "netconfigs");
+       assoc_file_name(filename, sizeof filename, &qrbuf, ctdl_netcfg_dir);
 
        /* 
         * Make sure there's actually a subscription there to remove
@@ -276,8 +276,8 @@ void do_unsubscribe(char *room, char *email, char *webpage) {
                "to unsubscribe\n"
                "&lt;%s&gt; from the <B>%s</B> mailing list.<BR><BR>\n"
                "Please click here to confirm this request:<BR>\n"
-               "<A HREF=\"http://%s?room=%s&token=%s&cmd=confirm\">"
-               "http://%s?room=%s&token=%s&cmd=confirm</A><BR><BR>\n"
+               "<A HREF=\"%s?room=%s&token=%s&cmd=confirm\">"
+               "%s?room=%s&token=%s&cmd=confirm</A><BR><BR>\n"
                "If this request has been submitted in error and you do\n"
                "<i>not</i> wish to unsubscribe from the "
                "'%s' mailing list, simply do nothing,\n"
@@ -344,7 +344,7 @@ void do_confirm(char *room, char *token) {
         * Now start scanning this room's netconfig file for the
         * specified token.
         */
-       assoc_file_name(filename, sizeof filename, &qrbuf, "netconfigs");
+       assoc_file_name(filename, sizeof filename, &qrbuf, ctdl_netcfg_dir);
        begin_critical_section(S_NETCONFIGS);
        ncfp = fopen(filename, "r+");
        if (ncfp != NULL) {