From: Art Cancro Date: Tue, 2 Aug 2005 03:40:15 +0000 (+0000) Subject: * Removed instances of hard-coded CTDLDIR; this breaks -h X-Git-Tag: v7.86~4753 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=96a2e4703f8c8046fc7a9f790140a5a7203cb317 * Removed instances of hard-coded CTDLDIR; this breaks -h --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 2a5f6d9d9..ec4d50dce 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -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 Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/citserver.c b/citadel/citserver.c index 2a19df2a8..0946ed548 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -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 diff --git a/citadel/file_ops.c b/citadel/file_ops.c index e4f69426f..1ee6ef3b2 100644 --- a/citadel/file_ops.c +++ b/citadel/file_ops.c @@ -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 diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 51a61cdc3..42b738a22 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -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 diff --git a/citadel/room_ops.c b/citadel/room_ops.c index 81b43db06..57d42b552 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -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 diff --git a/citadel/serv_network.c b/citadel/serv_network.c index f5d13c64f..055ef0f36 100644 --- a/citadel/serv_network.c +++ b/citadel/serv_network.c @@ -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"); diff --git a/citadel/user_ops.c b/citadel/user_ops.c index c71e98f84..b506bd9ff 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -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