Conversation
this implements the dirsync control as described in https://msdn.microsoft.com/en-us/library/aa366978(v=vs.85).aspx check ExampleDirSync() in search_test.go how to use
control.go
Outdated
| value.Description += " (DirSync)" | ||
| c := new(ControlDirSync) | ||
| if value.Value != nil { | ||
| valueChildren := ber.DecodePacket(value.Data.Bytes()) |
There was a problem hiding this comment.
Any reason DecodePacketErr is not used and checked here?
There was a problem hiding this comment.
laziness? ;-) this started as a copy of the paging control above...
| value.Description = "DirSync Control Value" | ||
| value.Children[0].Description = "Flags" | ||
| value.Children[1].Description = "MaxAttrCnt" | ||
| value.Children[2].Description = "Cookie" |
There was a problem hiding this comment.
Is this safe; assuming Children has at least 3 elements?
There was a problem hiding this comment.
the spec says there must be always 3, the cookie will be an empty string if it's unset (which only happens when the client sends the first time
| } | ||
| } | ||
|
|
||
| func ExampleDirSync() { |
There was a problem hiding this comment.
Are there tests that could be added too?
There was a problem hiding this comment.
yes, encoding / decoding in control_test.go
|
the race fix would also fix the build of PR #104 |
conn.go
Outdated
| once sync.Once | ||
| outstandingRequests uint | ||
| messageMutex sync.Mutex | ||
| timeoutMutex sync.Mutex |
There was a problem hiding this comment.
|
waiting for #168 ... |
|
Can we clean this up and get it ready to merge? |
|
@vetinari any chance you'd want to update this PR too? |
this implements the dirsync control as described in
https://msdn.microsoft.com/en-us/library/aa366978(v=vs.85).aspx
check ExampleDirSync() in search_test.go how to use