svn commit: samba r15877 - in branches/SAMBA_4_0/source/lib/registry/tools: .

jelmer at samba.org jelmer at samba.org
Wed May 24 22:57:15 GMT 2006


Author: jelmer
Date: 2006-05-24 22:57:14 +0000 (Wed, 24 May 2006)
New Revision: 15877

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

Log:
Fix error message - caught by the IBM checker

Modified:
   branches/SAMBA_4_0/source/lib/registry/tools/regtree.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/registry/tools/regtree.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/tools/regtree.c	2006-05-24 22:17:01 UTC (rev 15876)
+++ branches/SAMBA_4_0/source/lib/registry/tools/regtree.c	2006-05-24 22:57:14 UTC (rev 15877)
@@ -108,16 +108,29 @@
 
 	if (remote) {
 		error = reg_open_remote(&h, NULL, cmdline_credentials, remote, NULL);
+
+		if(!W_ERROR_IS_OK(error)) {
+			fprintf(stderr, "Unable to open remote registry at %s:%s \n", remote, win_errstr(error));
+			return 1;
+		}
+
 	} else if (backend) {
 	    error = reg_open_hive(NULL, backend, poptGetArg(pc), NULL, cmdline_credentials, &root);
+	
+		if(!W_ERROR_IS_OK(error)) {
+			fprintf(stderr, "Unable to open '%s' with backend '%s':%s \n", poptGetArg(pc), backend, win_errstr(error));
+			return 1;
+		}
 	} else {
 		error = reg_open_local (&h, NULL, cmdline_credentials);
+
+		if(!W_ERROR_IS_OK(error)) {
+			fprintf(stderr, "Unable to open local registry:%s \n", win_errstr(error));
+			return 1;
+		}
+
 	}
 
-	if(!W_ERROR_IS_OK(error)) {
-		fprintf(stderr, "Unable to open '%s' with backend '%s':%s \n", poptGetArg(pc), backend, win_errstr(error));
-		return 1;
-	}
 	poptFreeContext(pc);
 
 	error = WERR_OK;



More information about the samba-cvs mailing list