r9355: return the EnumKey and EnumValue list we have so far when we get a rpc fault
authorAndrew Tridgell <tridge@samba.org>
Wed, 17 Aug 2005 12:27:28 +0000 (12:27 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:33:27 +0000 (13:33 -0500)
(This used to be commit 3a9c63923fbb21dfb8e5fc549dde8fad8cb8f354)

source4/scripting/libjs/winreg.js

index 5323e91ae5c9dc4ec7f784452518b22f4b8d6ae6..8befd36045ee5d0c8fc6d478173239a56a0fed3f 100644 (file)
@@ -138,7 +138,7 @@ function winreg_enum_path(reg, path)
                var status = reg.winreg_EnumKey(io);
                if (!status.is_ok) {
                        winreg_close(reg, handle);
-                       return;
+                       return list;
                }
                var out = io.output;
                if (out.result == "WERR_MORE_DATA") {
@@ -146,7 +146,7 @@ function winreg_enum_path(reg, path)
                        idx--;
                        if (io.input.name.size > 32000) {
                                winreg_close(reg, handle);
-                               return undefined;
+                               return list;
                        }
                        continue;
                }
@@ -198,7 +198,7 @@ function winreg_enum_values(reg, path)
                var status = reg.winreg_EnumValue(io);
                if (!status.is_ok) {
                        winreg_close(reg, handle);
-                       return;
+                       return list;
                }
                var out = io.output;
                if (out.result == "WERR_MORE_DATA") {
@@ -208,7 +208,7 @@ function winreg_enum_values(reg, path)
                        /* limit blobs to 1M */
                        if (io.input.size > 1000000) {
                                winreg_close(reg, handle);
-                               return undefined;
+                               return list;
                        }
                        continue;
                }