Skip to content
Browse files

Minor cookie bugfix.

  • Loading branch information...
1 parent ee3e5f5 commit f9949ac901c1348913012aada20d0066afb5edee @jeremycx committed Jan 3, 2013
Showing with 8 additions and 13 deletions.
  1. +1 −9 LDAP.js
  2. +2 −2 README.md
  3. +1 −1 package.json
  4. +4 −1 src/LDAP.cc
View
10 LDAP.js
@@ -141,8 +141,6 @@ var LDAP = function(opts) {
bind(function() {
replayCallbacks();
if (syncopts) {
- console.log('Resetting syncopts:');
- console.log(syncopts);
sync(syncopts);
}
});
@@ -158,10 +156,7 @@ var LDAP = function(opts) {
function close() {
stats.closes++;
- // close() is buggy and leaks like crazy.
- // TODO: FIX THIS.
- // binding.close();
- // binding = null;
+ binding.close();
}
@@ -215,9 +210,6 @@ var LDAP = function(opts) {
}
function getcookie() {
- if (!syncopts) {
- throw new Error('Must start sync before getting cookie');
- }
return binding.getcookie();
}
View
4 README.md
@@ -1,4 +1,4 @@
-node-LDAP 1.1.0
+node-LDAP 1.1.1
===============
OpenLDAP client bindings for Node.js. Requires libraries from
@@ -39,7 +39,7 @@ Install
You must ensure you lave the latest OpenLDAP client libraries
installed from http:///www.openldap.org
-To install the 1.0.0 release from npm:
+To install the 1.1.1 release from npm:
npm install node-LDAP
View
2 package.json
@@ -2,7 +2,7 @@
"author": "Jeremy Childs <jeremyc@ssimicro.com>",
"name": "LDAP",
"description": "LDAP Binding for node.js",
- "version": "1.1.0",
+ "version": "1.1.1",
"homepage": "https://github.com/jeremycx/node-LDAP",
"repository": {
"type": "git",
View
5 src/LDAP.cc
@@ -940,7 +940,10 @@ class LDAPConnection : public ObjectWrap
NODE_METHOD(GetCookie) {
HandleScope Scope;
GETOBJ(c);
- return Scope.Close(String::New(c->ls->ls_cookie.bv_val));
+ if (c->ls) {
+ return Scope.Close(String::New(c->ls->ls_cookie.bv_val));
+ }
+ return Undefined();
}
static int SyncSearchEntry(ldap_sync_t * ls, LDAPMessage * msg,

0 comments on commit f9949ac

Please sign in to comment.
Something went wrong with that request. Please try again.