svn commit: samba r14067 - in branches/SAMBA_4_0/source/lib/samba3: .

metze at samba.org metze at samba.org
Thu Mar 9 13:28:54 GMT 2006


Author: metze
Date: 2006-03-09 13:28:54 +0000 (Thu, 09 Mar 2006)
New Revision: 14067

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14067

Log:
give more usefull errors

metze
Modified:
   branches/SAMBA_4_0/source/lib/samba3/winsdb.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/samba3/winsdb.c
===================================================================
--- branches/SAMBA_4_0/source/lib/samba3/winsdb.c	2006-03-09 12:46:27 UTC (rev 14066)
+++ branches/SAMBA_4_0/source/lib/samba3/winsdb.c	2006-03-09 13:28:54 UTC (rev 14067)
@@ -35,7 +35,7 @@
 	if((fp = x_fopen(fn,O_RDONLY,0)) == NULL) {
 		DEBUG(0,("initialise_wins: Can't open wins database file %s. Error was %s\n",
 			fn, strerror(errno) ));
-		return NT_STATUS_UNSUCCESSFUL;
+		return NT_STATUS_OPEN_FAILED;
 	}
 
 	*count = 0;
@@ -53,8 +53,9 @@
 		/* Read a line from the wins.dat file. Strips whitespace
 			from the beginning and end of the line.  */
 		line = fgets_slash(NULL,8,fp);
-		if (!line) 
-			return NT_STATUS_UNSUCCESSFUL;
+		if (!line) {
+			return NT_STATUS_UNEXPECTED_IO_ERROR;
+		}
       
 		if (*line == '#') {
 			SAFE_FREE(line);
@@ -67,7 +68,7 @@
 				DEBUG(0,("Discarding invalid wins.dat file [%s]\n",line));
 				SAFE_FREE(line);
 				x_fclose(fp);
-				return NT_STATUS_UNSUCCESSFUL;
+				return NT_STATUS_REVISION_MISMATCH;
 			}
 			SAFE_FREE(line);
 



More information about the samba-cvs mailing list