[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fixes for 2.99.42




Here are my accumulated  smtp.c fixes.
I decided that what the hell, memset() is not kosher
way to initialize something, but it does zeroing ok...

	/Matti Aarnio <mea@nic.funet.fi>

--- transports/smtp/smtp.c~	Sun Nov 24 16:59:01 1996
+++ transports/smtp/smtp.c	Tue Nov 26 16:46:42 1996
@@ -354,16 +354,11 @@
 	cmdline = &argv[0][0];
 	eocmdline = cmdline;
 
-	SS.ehlo_capabilities = 0;
-	SS.within_ehlo	     = 0;
+	memset(&SS,0,sizeof(SS));
 	SS.main_esmtp_on_banner = -1;
 	SS.servport      = -1;
 	SS.smtp_bufsize  = 8*1024;
-	SS.smtp_outcount = 0;
 	SS.ehlo_sizeval  = -1;
-	SS.smtpfp	 = NULL;
-	SS.pipebuf       = NULL;
-	SS.pipecmds	 = NULL;
 
 	for (i = 0; i < argc; ++i)
 	  eocmdline += strlen(argv[i]) + 1;
@@ -513,7 +508,7 @@
 	  logfp = NULL;
 
 	if (logfp)
-	  setvbuf(logfp, (char *)NULL, _IOLBF, 0);
+	  setvbuf(logfp, NULL, _IOLBF, 0);
 
 	getnobody();
 	getdaemon();
@@ -614,9 +609,11 @@
 	  }
 	
 	  if (dp->verbose) {
+	    if (SS.verboselog)
+	      fclose(SS.verboselog);
 	    SS.verboselog = (FILE *)fopen(dp->verbose,"a");
 	    if (SS.verboselog)
-	      setbuf(SS.verboselog,NULL);
+	      setvbuf(SS.verboselog, NULL, _IONBF, 0);
 	  }
 	  if (!SS.smtpfp) {
 	    if ((first_uid = atoi(dp->senders->misc)) < 0 ||