From 2435d1cf9329348df7917b2acfaab107c3ccfef9 Mon Sep 17 00:00:00 2001 From: Dan Larsen Date: Fri, 7 Dec 2012 23:07:53 +0100 Subject: [PATCH 1/2] Added a raw getter to be able to extract images correctly --- lib/messages/search_entry.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lib/messages/search_entry.js b/lib/messages/search_entry.js index 3daa52c..3a8a1a2 100644 --- a/lib/messages/search_entry.js +++ b/lib/messages/search_entry.js @@ -59,6 +59,30 @@ function SearchEntry(options) { }); return obj; }); + + this.__defineGetter__('raw', function () { + var obj = { + dn: self.dn.toString(), + controls: [] + }; + + self.attributes.forEach(function (a) { + if (a.buffers && a.buffers.length) { + if (a.buffers.length > 1) { + obj[a.type] = a.buffers.slice(); + } else { + obj[a.type] = a.buffers[0]; + } + } else { + obj[a.type] = []; + } + }); + self.controls.forEach(function (element, index, array) { + obj.controls.push(element.json); + }); + return obj; + }); + this.__defineGetter__('_dn', function () { return self.objectName; }); From 08e2b06262d94f78a97e179406b22633efed4fca Mon Sep 17 00:00:00 2001 From: Dan Larsen Date: Fri, 7 Dec 2012 23:10:55 +0100 Subject: [PATCH 2/2] Downgraded pooling dependency to match node 0.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6e76ece..1a1af1e 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "bunyan": "0.14.0", "dtrace-provider": "0.2.1", "nopt": "1.0.10", - "pooling": "0.3.2" + "pooling": "0.2.2" }, "devDependencies": { "tap": "0.3.1",