* Removed instances of hard-coded CTDLDIR; this breaks -h
authorArt Cancro <ajc@citadel.org>
Tue, 2 Aug 2005 03:40:15 +0000 (03:40 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 2 Aug 2005 03:40:15 +0000 (03:40 +0000)
citadel/ChangeLog
citadel/citserver.c
citadel/file_ops.c
citadel/msgbase.c
citadel/room_ops.c
citadel/serv_network.c
citadel/user_ops.c

index 2a5f6d9d969862ea37f9c1d07ec07dd896703e4c..ec4d50dce0c1f0a5279dd38767b14c26979c2973 100644 (file)
@@ -1,4 +1,7 @@
 $Log$
+Revision 653.16  2005/08/02 03:40:15  ajc
+* Removed instances of hard-coded CTDLDIR; this breaks -h
+
 Revision 653.15  2005/08/02 03:05:31  ajc
 * Added in Wilfried Goesgens' debian/ build directory.
 
@@ -6974,3 +6977,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index 2a19df2a856c0199942a3f31076cb69467c54020..0946ed54883313a388520114bb82911a69628ad1 100644 (file)
@@ -517,7 +517,7 @@ void cmd_emsg(char *mname)
        if (strlen(targ)==0) {
                snprintf(targ, sizeof targ, 
 #ifndef HAVE_DATA_DIR
-                        "." /* FIXME: should here be CTDLDIR ? */
+                        "."
 #else
                         DATA_DIR
 #endif
index e4f69426f853a858a0cc8ec99b7839015f8fcfdd..1ee6ef3b29695d4fd3c7afff23782c4c68c760df 100644 (file)
@@ -138,7 +138,7 @@ void cmd_delf(char *filename)
        }
        snprintf(pathname, sizeof pathname, 
 #ifndef HAVE_DATA_DIR
-                        "." /* FIXME: should here be CTDLDIR ? */
+                        "."
 #else
                         DATA_DIR
 #endif
@@ -277,7 +277,7 @@ void cmd_netf(char *cmdbuf)
        }
        snprintf(outfile, sizeof outfile,
 #ifndef HAVE_SPOOL_DIR
-                        CTDLDIR
+                        "."
 #else
                         SPOOL_DIR
 #endif
@@ -313,7 +313,7 @@ void cmd_netf(char *cmdbuf)
        snprintf(buf, sizeof buf,
                         "cd "
 #ifndef HAVE_DATA_DIR
-                        "." /* FIXME: should here be CTDLDIR ? */
+                        "."
 #else
                         DATA_DIR
 #endif
@@ -393,7 +393,7 @@ void cmd_open(char *cmdbuf)
 
        snprintf(pathname, sizeof pathname,
 #ifndef HAVE_DATA_DIR
-                        "." /* FIXME: should here be CTDLDIR ? */
+                        "."
 #else
                         DATA_DIR
 #endif
@@ -444,7 +444,7 @@ void cmd_oimg(char *cmdbuf)
                }
                snprintf(pathname, sizeof pathname, 
 #ifndef HAVE_DATA_DIR
-                                "." /* FIXME: should here be CTDLDIR ? */
+                                "."
 #else
                                 DATA_DIR
 #endif
@@ -454,7 +454,7 @@ void cmd_oimg(char *cmdbuf)
                which_floor = extract_int(cmdbuf, 1);
                snprintf(pathname, sizeof pathname,
 #ifndef HAVE_DATA_DIR
-                                "." /* FIXME: should here be CTDLDIR ? */
+                                "."
 #else
                                 DATA_DIR
 #endif
@@ -470,7 +470,7 @@ void cmd_oimg(char *cmdbuf)
                }
                snprintf(pathname, sizeof pathname, 
 #ifndef HAVE_DATA_DIR
-                                "." /* FIXME: should here be CTDLDIR ? */
+                                "."
 #else
                                 DATA_DIR
 #endif
@@ -525,7 +525,7 @@ void cmd_uopn(char *cmdbuf)
        }
        snprintf(CC->upl_path, sizeof CC->upl_path, 
 #ifndef HAVE_DATA_DIR
-                        "." /* FIXME: should here be CTDLDIR ? */
+                        "."
 #else
                         DATA_DIR
 #endif
@@ -533,7 +533,7 @@ void cmd_uopn(char *cmdbuf)
                         CC->room.QRdirname, CC->upl_file);
        snprintf(CC->upl_filedir, sizeof CC->upl_filedir,
 #ifndef HAVE_DATA_DIR
-                        "." /* FIXME: should here be CTDLDIR ? */
+                        "."
 #else
                         DATA_DIR
 #endif
@@ -594,7 +594,7 @@ void cmd_uimg(char *cmdbuf)
        if (CC->user.axlevel >= 6) {
                snprintf(CC->upl_path, sizeof CC->upl_path, 
 #ifndef HAVE_DATA_DIR
-                                "." /* FIXME: should here be CTDLDIR ? */
+                                "."
 #else
                                 DATA_DIR
 #endif
@@ -605,7 +605,7 @@ void cmd_uimg(char *cmdbuf)
        if (!strcasecmp(basenm, "_userpic_")) {
                snprintf(CC->upl_path, sizeof CC->upl_path,
 #ifndef HAVE_DATA_DIR
-                                "." /* FIXME: should here be CTDLDIR ? */
+                                "."
 #else
                                 DATA_DIR
 #endif
@@ -617,7 +617,7 @@ void cmd_uimg(char *cmdbuf)
                which_floor = extract_int(cmdbuf, 2);
                snprintf(CC->upl_path, sizeof CC->upl_path,
 #ifndef HAVE_DATA_DIR
-                                "." /* FIXME: should here be CTDLDIR ? */
+                                "."
 #else
                                 DATA_DIR
 #endif
@@ -670,7 +670,7 @@ void cmd_clos(void)
                CC->dl_is_net = 0;
                snprintf(buf, sizeof buf, 
 #ifndef HAVE_SPOOL_DIR
-                                CTDLDIR
+                                "."
 #else
                                 SPOOL_DIR
 #endif
@@ -834,7 +834,7 @@ void cmd_ndop(char *cmdbuf)
 
        snprintf(pathname, sizeof pathname, 
 #ifndef HAVE_SPOOL_DIR
-                        CTDLDIR
+                        "."
 #else
                         SPOOL_DIR
 #endif
@@ -887,7 +887,7 @@ void cmd_nuop(char *cmdbuf)
 
        snprintf(CC->upl_path, sizeof CC->upl_path,
 #ifndef HAVE_SPOOL_DIR
-                        CTDLDIR
+                        "."
 #else
                         SPOOL_DIR
 #endif
index 51a61cdc3f95f46c003cb1eca5ff2281244aee31..42b738a22df147e74924168c23341d1951d8265e 100644 (file)
@@ -2257,7 +2257,7 @@ long CtdlSubmitMsg(struct CtdlMessage *msg,       /* message to save */
                if (smr.len > 0) {
                        snprintf(submit_filename, sizeof submit_filename,
 #ifndef HAVE_SPOOL_DIR
-                                        CTDLDIR
+                                        "."
 #else
                                         SPOOL_DIR
 #endif
index 81b43db061dd2cb445c22ef5dc777113853d40d3..57d42b5522fcf8006f65eb59428a0f9894e5b261 100644 (file)
@@ -1078,7 +1078,7 @@ void cmd_rdir(void)
        }
        cprintf("%d %s|"
 #ifndef HAVE_DATA_DIR
-                       CTDLDIR
+                       "."
 #else
                        DATA_DIR
 #endif
@@ -1087,7 +1087,7 @@ void cmd_rdir(void)
 
        snprintf(buf, sizeof buf, "ls "
 #ifndef HAVE_DATA_DIR
-                        CTDLDIR
+                        "."
 #else
                         DATA_DIR
 #endif
@@ -1097,7 +1097,7 @@ void cmd_rdir(void)
 
        snprintf(buf, sizeof buf, 
 #ifndef HAVE_DATA_DIR
-                        CTDLDIR
+                        "."
 #else
                         DATA_DIR
 #endif
@@ -1112,7 +1112,7 @@ void cmd_rdir(void)
                if (strcasecmp(flnm, "filedir")) {
                        snprintf(buf, sizeof buf, 
 #ifndef HAVE_DATA_DIR
-                                        CTDLDIR
+                                        "."
 #else
                                         DATA_DIR
 #endif
@@ -1425,7 +1425,7 @@ void cmd_setr(char *args)
        if (CC->room.QRflags & QR_DIRECTORY) {
                snprintf(buf, sizeof buf, 
 #ifndef HAVE_DATA_DIR
-                                CTDLDIR
+                                "."
 #else
                                 DATA_DIR
 #endif
index f5d13c64f0f881e96040c71ffc0d64cf89b6ea4c..055ef0f36f47172f589e426be9e5d33b84f0b8f3 100644 (file)
@@ -725,7 +725,7 @@ void network_spool_msg(long msgnum, void *userdata) {
                                        /* write it to the spool file */
                                        snprintf(filename, sizeof filename,
 #ifndef HAVE_SPOOL_DIR
-                                                        CTDLDIR
+                                                        "."
 #else
                                                         SPOOL_DIR
 #endif /* HAVE_SPOOL_DIR */
@@ -1382,7 +1382,7 @@ void network_process_buffer(char *buffer, long size) {
                                }
                                snprintf(filename, sizeof filename,
 #ifndef HAVE_SPOOL_DIR
-                                                CTDLDIR
+                                                "."
 #else
                                                 SPOOL_DIR
 #endif /* HAVE_SPOOL_DIR */
@@ -1558,7 +1558,7 @@ void network_do_spoolin(void) {
 
        dp = opendir(
 #ifndef HAVE_SPOOL_DIR
-                                CTDLDIR
+                                "."
 #else
                                 SPOOL_DIR
 #endif /* HAVE_SPOOL_DIR */
@@ -1569,7 +1569,7 @@ void network_do_spoolin(void) {
                if ((strcmp(d->d_name, ".")) && (strcmp(d->d_name, ".."))) {
                        snprintf(filename, sizeof filename,
 #ifndef HAVE_SPOOL_DIR
-                                        CTDLDIR
+                                        "."
 #else
                                         SPOOL_DIR
 #endif /* HAVE_SPOOL_DIR */
@@ -1581,7 +1581,6 @@ void network_do_spoolin(void) {
        closedir(dp);
 }
 
-#ifdef ___DISABLED___
 /*
  * Delete any files in the outbound queue that were intended
  * to be sent to nodes which no longer exist.
@@ -1595,7 +1594,7 @@ void network_purge_spoolout(void) {
 
        dp = opendir(
 #ifndef HAVE_SPOOL_DIR
-                                CTDLDIR
+                                "."
 #else
                                 SPOOL_DIR
 #endif /* HAVE_SPOOL_DIR */
@@ -1607,7 +1606,7 @@ void network_purge_spoolout(void) {
                        continue;
                snprintf(filename, sizeof filename,
 #ifndef HAVE_SPOOL_DIR
-                                CTDLDIR
+                                "."
 #else
                                 SPOOL_DIR
 #endif /* HAVE_SPOOL_DIR */
@@ -1624,7 +1623,6 @@ void network_purge_spoolout(void) {
 
        closedir(dp);
 }
-#endif /* ___DISABLED___ */
 
 
 /*
@@ -1699,7 +1697,7 @@ void receive_spool(int sock, char *remote_nodename) {
        /* TODO: make move inline. forking is verry expensive. */
        snprintf(buf, sizeof buf, "mv %s "
 #ifndef HAVE_SPOOL_DIR
-                        CTDLDIR
+                        "."
 #else
                         SPOOL_DIR
 #endif /* HAVE_SPOOL_DIR */
@@ -1731,7 +1729,7 @@ void transmit_spool(int sock, char *remote_nodename)
 
        snprintf(sfname, sizeof sfname, 
 #ifndef HAVE_SPOOL_DIR
-                        CTDLDIR
+                        "."
 #else
                         SPOOL_DIR
 #endif /* HAVE_SPOOL_DIR */
@@ -1780,6 +1778,7 @@ ABORTUPL:
                        bytes_written, remote_nodename);
        lprintf(CTDL_DEBUG, "<%s\n", buf);
        if (buf[0] == '2') {
+               lprintf(CTDL_DEBUG, "Removing <%s>\n", sfname);
                unlink(sfname);
        }
 }
@@ -1862,7 +1861,7 @@ void network_poll_other_citadel_nodes(int full_poll) {
                        if (poll == 0) {
                                snprintf(spoolfile, sizeof spoolfile,
 #ifndef HAVE_SPOOL_DIR
-                                                CTDLDIR
+                                                "."
 #else
                                                 SPOOL_DIR
 #endif
@@ -1887,10 +1886,10 @@ void network_poll_other_citadel_nodes(int full_poll) {
  */
 void create_spool_dirs(void) {
 #ifndef HAVE_SPOOL_DIR
-       mkdir(CTDLDIR "/network", 0700);
-       mkdir(CTDLDIR "/network/systems", 0700);
-       mkdir(CTDLDIR "/network/spoolin", 0700);
-       mkdir(CTDLDIR "/network/spoolout", 0700);
+       mkdir("./network", 0700);
+       mkdir("./network/systems", 0700);
+       mkdir("./network/spoolin", 0700);
+       mkdir("./network/spoolout", 0700);
 #else
        mkdir(SPOOL_DIR "/network", 0700);
        mkdir(SPOOL_DIR "/network/systems", 0700);
@@ -1974,7 +1973,7 @@ void network_do_queue(void) {
        free_filter_list(filterlist);
        filterlist = NULL;
 
-       /* network_purge_spoolout(); */
+       network_purge_spoolout();
 
        lprintf(CTDL_DEBUG, "network: queue run completed\n");
 
index c71e98f84b0891539c54b2ad9d8e5085eb344632..b506bd9ff39995709f7eaf91014383235381dc25 100644 (file)
@@ -758,7 +758,7 @@ int purge_user(char pname[])
        /* remove the user's bio file */
        snprintf(filename, sizeof filename, 
 #ifndef HAVE_DATA_DIR
-                        "." /* FIXME: should here be CTDLDIR ? */
+                        "."
 #else
                         DATA_DIR
 #endif
@@ -768,7 +768,7 @@ int purge_user(char pname[])
        /* remove the user's picture */
        snprintf(filename, sizeof filename, 
 #ifndef HAVE_DATA_DIR
-                        "." /* FIXME: should here be CTDLDIR ? */
+                        "."
 #else
                         DATA_DIR
 #endif