You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: enable DirSync control in search operation (#436)
* feat: enable DirSync control in search operation
* fix: fixed ineffectual assignment to err
* fix: fixed should replace loop with error
* fix: not include Cookie in SearchResult struct
---------
Co-authored-by: shimokubo <shimokubo@osstech.co.jp>
return nil, fmt.Errorf("Expected DirSync control to be of type *ControlDirSync, got %v", control)
598
+
}
599
+
if castControl.Flags != flags {
600
+
return nil, fmt.Errorf("flags given in search request (%d) conflicts with flags given in search call (%d)", castControl.Flags, flags)
601
+
}
602
+
if castControl.MaxAttrCnt != maxAttrCount {
603
+
return nil, fmt.Errorf("MaxAttrCnt given in search request (%d) conflicts with maxAttrCount given in search call (%d)", castControl.MaxAttrCnt, maxAttrCount)
604
+
}
605
+
dirSyncControl = castControl
606
+
}
607
+
searchResult := new(SearchResult)
608
+
result, err := l.Search(searchRequest)
609
+
l.Debug.Printf("Looking for result...")
610
+
if err != nil {
611
+
return searchResult, err
612
+
}
613
+
if result == nil {
614
+
return searchResult, NewError(ErrorNetwork, errors.New("ldap: packet not received"))
0 commit comments