changeset 462:439a151b29d6

Clean up a bit
author mmj
date Mon, 14 Feb 2005 03:58:29 +1100
parents 9bd2d7fc5782
children 030dfa571be4
files ChangeLog src/mlmmj-sub.c
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Feb 09 05:40:50 2005 +1100
+++ b/ChangeLog	Mon Feb 14 03:58:29 2005 +1100
@@ -1,3 +1,4 @@
+ o Unlink totally harmless .lock files in subscribers dir.
  o Make it possible to specify more than one listaddress in
    LISTDIR/control/listaddress. The first one is the "real" one.
  o Make the port to connect to controlable with LISTDIR/control/smtpport
--- a/src/mlmmj-sub.c	Wed Feb 09 05:40:50 2005 +1100
+++ b/src/mlmmj-sub.c	Mon Feb 14 03:58:29 2005 +1100
@@ -405,15 +405,19 @@
 	}
 	suboff = find_subscriber(subfilefd, address);
 	if(suboff == -1) {
-		if(subconfirm)
+		if(subconfirm) {
+			close(subfilefd);
+			unlink(sublockname);
 			generate_subconfirm(listdir, listaddr, address,
 					    mlmmjsend, typesub);
-		else {
+		} else {
 			lseek(subfilefd, 0L, SEEK_END);
 			len = strlen(address);
 			address[len] = '\n';
 			writen(subfilefd, address, len + 1);
 			address[len] = 0;
+			close(subfilefd);
+			unlink(sublockname);
 		}
 	} else {
 		close(subfilefd);