From 2ec69980c8a5a8fd1ea9a5a6bbf62c40d9c14f3f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 9 Mar 2006 13:28:54 +0000 Subject: r14067: give more usefull errors metze (This used to be commit bc5281a95f2c79f88895282e8e38add116eef789) --- source4/lib/samba3/winsdb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source4/lib/samba3/winsdb.c b/source4/lib/samba3/winsdb.c index cd052ca437..18e6c1004f 100644 --- a/source4/lib/samba3/winsdb.c +++ b/source4/lib/samba3/winsdb.c @@ -35,7 +35,7 @@ NTSTATUS samba3_read_winsdb( const char *fn, TALLOC_CTX *ctx, struct samba3_wins 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 @@ NTSTATUS samba3_read_winsdb( const char *fn, TALLOC_CTX *ctx, struct samba3_wins /* 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 @@ NTSTATUS samba3_read_winsdb( const char *fn, TALLOC_CTX *ctx, struct samba3_wins 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); -- cgit