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 --- bind.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bind.go') diff --git a/bind.go b/bind.go index 30bc83f..7d99f06 100644 --- a/bind.go +++ b/bind.go @@ -33,8 +33,8 @@ func (l *Conn) Bind(username, password string) *Error { return NewError(ErrorNetwork, errors.New("Could not send message")) } defer l.finishMessage(messageID) - packet = <-channel + packet = <-channel if packet == nil { return NewError(ErrorNetwork, errors.New("Could not retrieve response")) } @@ -46,9 +46,9 @@ func (l *Conn) Bind(username, password string) *Error { ber.PrintPacket(packet) } - result_code, result_description := getLDAPResultCode(packet) - if result_code != 0 { - return NewError(result_code, errors.New(result_description)) + resultCode, resultDescription := getLDAPResultCode(packet) + if resultCode != 0 { + return NewError(resultCode, errors.New(resultDescription)) } return nil -- cgit v1.2.3