Browse code

FixStaleSocket no longer complains on ENOENT

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@185 77e5149b-7576-45b1-b177-96237e5ba77b

Nigel Horne authored on 2004/01/13 00:32:33
Showing 3 changed files
... ...
@@ -1,3 +1,8 @@
1
+Mon Jan 12 15:31:32 GMT 2004 (njh)
2
+----------------------------------
3
+  * clamav-milter: FixStaleSocket: no longer complain if asked to remove
4
+	an old socket when there was none to remove
5
+
1 6
 Mon Jan 12 08:58:59 GMT 2004 (njh)
2 7
 ----------------------------------
3 8
   * docs:	Note that clamav-milter requires clamd
... ...
@@ -202,6 +202,8 @@ Changes
202 202
 		idea by Andy Fiddaman <af@jeamland.org>
203 203
 0.66d	10/1/04	Added OpenBSD instructions
204 204
 		Added --signature-file option
205
+0.66e	12/1/04	FixStaleSocket: no longer complain if asked to remove
206
+		an old socket when there was none to remove
205 207
 
206 208
 BUG REPORTS
207 209
 
... ...
@@ -205,9 +205,14 @@
205 205
  *			idea by Andy Fiddaman <af@jeamland.org>
206 206
  *	0.66d	10/1/04	Added OpenBSD instructions
207 207
  *			Added --signature-file option
208
+ *	0.66e	12/1/04	FixStaleSocket: no longer complain if asked to remove
209
+ *			an old socket when there was none to remove
208 210
  *
209 211
  * Change History:
210 212
  * $Log: clamav-milter.c,v $
213
+ * Revision 1.36  2004/01/12 15:30:53  nigelhorne
214
+ * FixStaleSocket no longer complains on ENOENT
215
+ *
211 216
  * Revision 1.35  2004/01/10 16:22:14  nigelhorne
212 217
  * Added OpenBSD instructions and --signature-file
213 218
  *
... ...
@@ -298,7 +303,7 @@
298 298
  * Revision 1.6  2003/09/28 16:37:23  nigelhorne
299 299
  * Added -f flag use MaxThreads if --max-children not set
300 300
  */
301
-static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.35 2004/01/10 16:22:14 nigelhorne Exp $";
301
+static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.36 2004/01/12 15:30:53 nigelhorne Exp $";
302 302
 
303 303
 #define	CM_VERSION	"0.66d"
304 304
 
... ...
@@ -874,10 +879,12 @@ main(int argc, char **argv)
874 874
 		 */
875 875
 		if(strncasecmp(port, "unix:", 5) == 0) {
876 876
 			if(unlink(&port[5]) < 0)
877
-				perror(&port[5]);
877
+				if(errno != ENOENT)
878
+					perror(&port[5]);
878 879
 		} else if(strncasecmp(port, "local:", 6) == 0) {
879 880
 			if(unlink(&port[6]) < 0)
880
-				perror(&port[6]);
881
+				if(errno != ENOENT)
882
+					perror(&port[6]);
881 883
 		}
882 884
 	}
883 885