svn commit: samba r26303 - in branches/SAMBA_4_0/source/scripting/libjs: .

abartlet at samba.org abartlet at samba.org
Wed Dec 5 03:00:50 GMT 2007


Author: abartlet
Date: 2007-12-05 03:00:48 +0000 (Wed, 05 Dec 2007)
New Revision: 26303

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

Log:
Fix up error reporting during the delete of previous entries in the
provision, and ignore 'no such entry' as an error (it is normal, and
just means the partition is compleatly empty).

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/scripting/libjs/provision.js


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/libjs/provision.js
===================================================================
--- branches/SAMBA_4_0/source/scripting/libjs/provision.js	2007-12-05 01:25:39 UTC (rev 26302)
+++ branches/SAMBA_4_0/source/scripting/libjs/provision.js	2007-12-05 03:00:48 UTC (rev 26303)
@@ -224,7 +224,10 @@
 			var res2 = ldb.search(anything, basedn, ldb.SCOPE_SUBTREE, attrs);
 			var i;
 			if (res2.error != 0) {
-				info.message("ldb search failed: " + res.errstr + "\n");
+				if (res2.error == 32) {
+					break;
+				}
+				info.message("ldb search failed: " + res2.errstr + "\n");
 				continue;
 			}
 			previous_remaining = current_remaining;
@@ -235,7 +238,7 @@
 			
 			var res3 = ldb.search(anything, basedn, ldb.SCOPE_SUBTREE, attrs);
 			if (res3.error != 0) {
-				info.message("ldb search failed: " + res.errstr + "\n");
+				info.message("ldb search failed: " + res3.errstr + "\n");
 				continue;
 			}
 			if (res3.msgs.length != 0) {



More information about the samba-cvs mailing list