This reverts commit 5934b30b95.
* It got the way of an heisenbug and it seems this change
fixed the problems, but after 2 days the media_server returned
to block. Sorry about that! Will investigate further.
TCPEndpoint::Free() uses _EnterTimeWait() to start the time-wait timer
for later cleanup. The latter did call _CancelConnectionTimers()
unconditionally however, also cancelling a retransmit timer that was
possibly still needed for the retransmission of the FIN packet. If the
FIN packet got lost, the connection would be left open on the other end.
The APICall trace entry just records the function name but this is
enough to deduce where some of the state changes come from.
Also move the TRACE macros past the MutexLockers to ensure that their
output happens at the time when the methods actually run.
The retransmit timer was only stopped when all in flight data was
acknowledged and never updated on individual acknowledgements. This
caused a lot of erroneous retransmits whenever the buffer was filled
fast enough so that the acknowledgements never caught up, i.e. whenever
uploading or streaming data.
Move setting of the initial retransmit timer inside the send loop so it
is closer to the actual time the segment is sent out and simplify the
logic a bit.
Limit the minimal retransmit timeout to 200 msecs to avoid spurious
retransmit in the face of delayed acknowledgements. This is lower than
the 1 second minimum the RFCs suggest. Other stacks use various other
sub-second timeouts, the 200 msecs follows what Linux does.
Also add the exponential back off of the retransmit timeout when
retransmits are triggered. This is bounded by a 60 seconds maximum
according to RFC6298.
The WaitList implementation had a race condition between checking for
the condition and acquiering the semaphore. If a thread was rescheduled
at that point, the signal could be missed due to the use of
release_sem_etc() with the B_RELEASE_ALL flag while the thread was not
yet waiting for the semaphore. The transfer would subsequently stall.
ThreadHandler:
- Simplify SetBreakpointAndRun() to always use the debugger interface to
continue execution, since the latter is now intelligent enough to determine
how to handle that in all cases. Adjust callers accordingly.
- B_DEBUG_MESSAGE_CONTINUE_THREAD now checks if the thread in question
is in a suspended state rather than waiting on the debug nub port, and
if so, handles resuming it automatically. This allows the continue message
to be used on the main thread of a team that was freshly created under
debug control without the API user having to be cognizant of the distinction.
Previously, <stdlib.h> wasn't included (which is where environ is),
but Axel changed some Be API headers and now it is indirectly included,
which broke the build.
Fixes#12263.
- SetItemCollapsed()/IsItemCollapsed() didn't properly handle inverting
values when mapping between the collapsed flag and the layout item's
internal visibility flag, leading to them having the opposite semantics
from what their name would suggest.
* B_AUTO_UPDATE_SIZE_LIMITS only really makes sense for resizable
windows, and it only sets the minimum/maximum window size.
* ResizeToPreferred() resizes the window to its preferred size, and
also supports height-for-width layouts.
* Since the Media preferences are always watching for media
status, it's good to clean up the window when the media services
are not running. This avoid the user try to use controls where
services are down.
* The DHCP Client is the one configuring interfaces, so it makes no
sense to request address resolution for already configured interfaces
only.
* Fixes#12208
If I had used my head instead of blindly c&p'ing the suggested code
from Axel's message, I would have realized that Unset() unsets fStatus
too. Not a bright thing to do on my part...
* Media is now waiting for media_server to start if the window
is closed before to finish, this was proposed by stippi.
* Moved out anything related to notifications as they are now
managed by the media_kit.
* Solved some TODOs and minor issues too.