Update of /cvsroot/qmailadmin/qmailadmin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12947
Modified Files:
Tag: stable-1_2
ChangeLog user.c
Log Message:
Fix bug from 1.2.6 related to creating .qmail files when one didn't already exist.
Index: user.c
===================================================================
RCS file: /cvsroot/qmailadmin/qmailadmin/user.c,v
retrieving revision 1.11.2.9
retrieving revision 1.11.2.10
diff -u -d -r1.11.2.9 -r1.11.2.10
--- user.c 23 Dec 2004 18:39:48 -0000 1.11.2.9
+++ user.c 3 Jan 2005 20:31:09 -0000 1.11.2.10
@@ -904,9 +904,6 @@
}
}
}
- if (olddotqmail == NULL) {
- olddotqmail = "";
- }
fs = fopen (dotqmailfn, "w");
@@ -914,18 +911,20 @@
* lines to the new .qmail file.
*/
emptydotqmail = 1;
- dotqmailline = strtok (olddotqmail, "\n");
- while (dotqmailline) {
- if ( (*dotqmailline == '|') &&
- (strstr (dotqmailline, "/true delete") == NULL) &&
- (strstr (dotqmailline, "/autorespond ") == NULL) &&
- (strstr (dotqmailline, SPAM_COMMAND) == NULL) ) {
- fprintf (fs, "%s\n", dotqmailline);
- emptydotqmail = 0;
+ if (olddotqmail != NULL) {
+ dotqmailline = strtok (olddotqmail, "\n");
+ while (dotqmailline) {
+ if ( (*dotqmailline == '|') &&
+ (strstr (dotqmailline, "/true delete") == NULL) &&
+ (strstr (dotqmailline, "/autorespond ") == NULL) &&
+ (strstr (dotqmailline, SPAM_COMMAND) == NULL) ) {
+ fprintf (fs, "%s\n", dotqmailline);
+ emptydotqmail = 0;
+ }
+ dotqmailline = strtok (NULL, "\n");
}
- dotqmailline = strtok (NULL, "\n");
+ free (olddotqmail);
}
- if (olddotqmail != NULL) free (olddotqmail);
/* Decide on what to write to the new .qmail file after any old program
* delivery lines are written.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/qmailadmin/qmailadmin/ChangeLog,v
retrieving revision 1.15.2.49
retrieving revision 1.15.2.50
diff -u -d -r1.15.2.49 -r1.15.2.50
--- ChangeLog 31 Dec 2004 01:38:33 -0000 1.15.2.49
+++ ChangeLog 3 Jan 2005 20:31:09 -0000 1.15.2.50
@@ -12,6 +12,8 @@
and "Vacation" to "Send Vacation Auto-Repsonse".
- template.c: Add macro for current language (##~) and document
in html/README. [818883]
+ - user.c: Fix bug from 1.2.6 related to creating .qmail files when
+ one didn't already exist.
1.2.6 - released 24-Dec-04
|