very small patch for 2.2 ( and 3 too )

andreas moroder claudiamoroder at st-ulrich.suedtirol.net
Tue Jan 15 10:22:06 GMT 2002


Hello,

here a very small patch against 2.2 ( should works against HEAD too ).
It adds a debug message if write does not write out all the data.
( It's not complete, but better then before )

apply it against smbd/process.c

Bye
Andreas

--- process.c	Tue Jan 15 18:57:18 2002
+++ process.and	Tue Jan 15 18:57:10 2002
@@ -602,6 +602,7 @@
 static void smb_dump(char *name, int type, char *data, ssize_t len)
 {
 	int fd, i;
+	ssize_t l;
 	pstring fname;
 	if (DEBUGLEVEL < 50) return;
 
@@ -613,9 +614,11 @@
 		if (fd != -1 || errno != EEXIST) break;
 	}
 	if (fd != -1) {
-		write(fd, data, len);
+		l=write(fd, data, len);
 		close(fd);
 		DEBUG(0,("created %s len %d\n", fname, len));
+		if ( l!=len)
+			DEBUG(0,("write stopped after %d bytes\n",i));
 	}
 }
 




More information about the samba-technical mailing list