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>
returnnil, fmt.Errorf("Expected DirSync control to be of type *ControlDirSync, got %v", control)
598
+
}
599
+
ifcastControl.Flags!=flags {
600
+
returnnil, fmt.Errorf("flags given in search request (%d) conflicts with flags given in search call (%d)", castControl.Flags, flags)
601
+
}
602
+
ifcastControl.MaxAttrCnt!=maxAttrCount {
603
+
returnnil, 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
+
iferr!=nil {
611
+
returnsearchResult, err
612
+
}
613
+
ifresult==nil {
614
+
returnsearchResult, NewError(ErrorNetwork, errors.New("ldap: packet not received"))
0 commit comments