aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--read.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/read.go b/read.go
index 06e54b2..ef6df63 100644
--- a/read.go
+++ b/read.go
@@ -213,10 +213,11 @@ func (server *Server) handleSearchInternal(state *State, w ldap.ResponseWriter,
continue
}
// Send result
+ resultVals := []message.AttributeValue{}
for _, v := range val {
- e.AddAttribute(message.AttributeDescription(attr),
- message.AttributeValue(v))
+ resultVals = append(resultVals, message.AttributeValue(v))
}
+ e.AddAttribute(message.AttributeDescription(attr), resultVals...)
}
w.Write(e)
}