changeset 281:97634188c50c

standard replies did not work before
author mmj
date Mon, 28 Jun 2004 07:18:44 +1000
parents 8ea7108cc4ae
children 0c8bcac1e4bb
files ChangeLog TUNABLES src/do_all_the_voodo_here.c src/prepstdreply.c
diffstat 4 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jun 25 18:14:25 2004 +1000
+++ b/ChangeLog	Mon Jun 28 07:18:44 2004 +1000
@@ -1,3 +1,5 @@
+ o Fix bug with prepstdreply not opening correct file. Thanks Christian Laursen
+   for spotting.
 0.8.1
  o Go through all open() calls and retry in case we (allthough it's extremely
    unlikely) did get EEXIST
--- a/TUNABLES	Fri Jun 25 18:14:25 2004 +1000
+++ b/TUNABLES	Mon Jun 28 07:18:44 2004 +1000
@@ -17,8 +17,8 @@
 
  · moderated			(boolean)
 
-   If this file is present, the emailaddresses in the file listdir/moderators
-   will act as moderators for the list.
+   If this file is present, the emailaddresses in the file
+   listdir/control/moderators will act as moderators for the list.
 
  · tocc				(boolean)
 
--- a/src/do_all_the_voodo_here.c	Fri Jun 25 18:14:25 2004 +1000
+++ b/src/do_all_the_voodo_here.c	Mon Jun 28 07:18:44 2004 +1000
@@ -95,7 +95,7 @@
 					return -1;
 				}
 			}
-			write(outfd, hdrline, strlen(hdrline));
+			writen(outfd, hdrline, strlen(hdrline));
 			fsync(outfd);
 			myfree(hdrline);
 			break;
--- a/src/prepstdreply.c	Fri Jun 25 18:14:25 2004 +1000
+++ b/src/prepstdreply.c	Mon Jun 28 07:18:44 2004 +1000
@@ -69,13 +69,12 @@
 		retstr = concatstr(3, listdir, "/queue/", tmp);
 		myfree(tmp);
 
-                outfd = open(filename, O_RDWR|O_CREAT|O_EXCL,
-				       S_IRUSR|S_IWUSR);
+		outfd = open(retstr, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR);
 
 	} while ((outfd < 0) && (errno == EEXIST));
 	
 	if(outfd < 0) {
-		log_error(LOG_ARGS, "Could not open std mail %s", tmp);
+		log_error(LOG_ARGS, "Could not open std mail %s", retstr);
 		myfree(str);
 		return NULL;
 	}