r9465: handle encoding and decoding of pointers, representing them as a
authorAndrew Tridgell <tridge@samba.org>
Mon, 22 Aug 2005 01:52:22 +0000 (01:52 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:34:18 +0000 (13:34 -0500)
string containing "(POINTER)"

source/scripting/libjs/encoder.js
swat/scripting/client/encoder.js

index 24508f3f6b15d2a17455ec3f3594dbf3cf3d62fc..d96b8595470184f6d1751f77e33ffe6c47e76bf9 100644 (file)
@@ -52,6 +52,8 @@ function encodeElement(e, name) {
                r = s.sprintf("%s:%s:%s:", name, t, "" + e);
        } else if (t == "undefined" || t == "null") {
                r = s.sprintf("%s:%s:", name, t);
+       } else if (t == "pointer") {
+               r = s.sprintf("%s:string:(POINTER):", name);
        } else {
                println("Unable to linearise type " + t);
                r = "";
index 2b1db669d288375dd6b481633a5d2549cf54aad5..4aa4cc095473d199c52952795d7ad176e4092275 100644 (file)
@@ -71,7 +71,7 @@ function decodeObjectArray(a) {
                        value = a[a.i]; a.i++;
                        o[name] = value * 1;
                } else {
-                       alert("Unable to delinearise type " + t);
+                       alert("Unable to delinearise type " + type);
                }
        }
        return o;