Merge pull request #112 from wdouglascampbell/Issue97
make changes recommended in Issue 97
This commit is contained in:
commit
dc359215aa
|
@ -68,13 +68,21 @@ ModifyDNRequest.prototype._parse = function (ber) {
|
|||
|
||||
|
||||
ModifyDNRequest.prototype._toBer = function (ber) {
|
||||
assert.ok(ber);
|
||||
//assert.ok(ber);
|
||||
|
||||
ber.writeString(this.entry.toString());
|
||||
ber.writeString(this.newRdn.toString());
|
||||
ber.writeBoolean(this.deleteOldRdn);
|
||||
if (this.newSuperior)
|
||||
ber.writeString(this.newSuperior.toString());
|
||||
if (this.newSuperior) {
|
||||
var s = this.newSuperior.toString();
|
||||
var len = Buffer.byteLength(s);
|
||||
|
||||
ber.writeByte(0x80); // MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG
|
||||
ber.writeByte(len);
|
||||
ber._ensure(len);
|
||||
ber._buf.write(s, ber._offset);
|
||||
ber._offset += len;
|
||||
}
|
||||
|
||||
return ber;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue