TURN server sockets were being destroyed asynchronously, which could
happen after the TurnServer itself (and even the VirtualSocketServer
used by the sockets) were destroyed.
This is fixed easily by using an AsyncInvoker (to ensure the async
operation doesn't occur after its initiator is destroyed), and keeping
the objects waiting for deletion in a unique_ptr vector.
Review-Url: https://codereview.webrtc.org/2264343002
Cr-Commit-Position: refs/heads/master@{#13907}
If the test TURN server received two allocate requests from the same
address, it was replacing the old allocation but not deleting it.
Also switching to std::unique_ptr to make it less likely for this to
pop up again.
Review-Url: https://codereview.webrtc.org/2114063002
Cr-Commit-Position: refs/heads/master@{#13449}
But keep #including scoped_ptr.h in .h files, so as not to break
WebRTC users who expect those .h files to give them rtc::scoped_ptr.
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1923163003
Cr-Commit-Position: refs/heads/master@{#12532}
This allows the reader to reference data, thus avoiding unnecessary
allocations and memory copies.
BUG=webrtc:5155,webrtc:5670
Review URL: https://codereview.webrtc.org/1821083002
Cr-Commit-Position: refs/heads/master@{#12160}
Also changed from unsigned to signed integer per the style guide.
By the way, I kept all delta-times to be 32-bit int.
The only things left in the p2p dir are
1. proberprober/main.cc where Time() is used as the input for a random number.
2. pseudotcp.cc: where 32-bit time info is sent over the wire.
BUG=webrtc:5636
Review URL: https://codereview.webrtc.org/1793553002
Cr-Commit-Position: refs/heads/master@{#12019}
For example, when the TURN port has an ALLOCATE_MISMATCH error.
BUG=webrtc:5432
Review URL: https://codereview.webrtc.org/1595613004
Cr-Commit-Position: refs/heads/master@{#11453}
This means that if a TURN server denies permission for an
unreachable address, we'll no longer ping it fruitlessly.
BUG=webrtc:4917
Review URL: https://codereview.webrtc.org/1415313004
Cr-Commit-Position: refs/heads/master@{#10789}