From 16e1575c86d09a0495b994341e9541a9fdfc6761 Mon Sep 17 00:00:00 2001 From: tmfkams Date: Sun, 2 Feb 2014 19:00:45 +0100 Subject: refactoring, redesigned connection/message handling --- ldap.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ldap.go') diff --git a/ldap.go b/ldap.go index 71916f8..cc0d18f 100644 --- a/ldap.go +++ b/ldap.go @@ -290,9 +290,9 @@ func NewError(ResultCode uint8, Err error) *Error { return &Error{ResultCode: ResultCode, Err: Err} } -func getLDAPResultCode(p *ber.Packet) (code uint8, description string) { - if len(p.Children) >= 2 { - response := p.Children[1] +func getLDAPResultCode(packet *ber.Packet) (code uint8, description string) { + if len(packet.Children) >= 2 { + response := packet.Children[1] if response.ClassType == ber.ClassApplication && response.TagType == ber.TypeConstructed && len(response.Children) == 3 { code = uint8(response.Children[0].Value.(uint64)) description = response.Children[2].Value.(string) -- cgit v1.2.3