The value of call->app.mode is changed by the application thread
without taking the call lock. Instead of using this variable in
SendXmitList to determine whether the queue should be flushed, add
a new flag (RX_CALL_FLUSH) to control flushing behaviour.
As call->flags is manipulated under the call lock, its value can
be safely used by SendXmitList.
Change-Id: I8416697f457e5003af08a35ac08809512b03a9be
Reviewed-on: http://gerrit.openafs.org/8286
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
* the listener or event threads
*/
if ((list[len - 1]->header.flags & RX_LAST_PACKET)
- || call->app.mode == RX_MODE_RECEIVING || call->app.mode == RX_MODE_EOF
+ || (call->flags & RX_CALL_FLUSH)
|| (call->flags & RX_CALL_FAST_RECOVER)) {
/* Check for the case where the current list contains
* an acked packet. Since we always send retransmissions
#define RX_CALL_PEER_BUSY 0x20000 /* the last packet we received on this call was a
* BUSY packet; i.e. the channel for this call is busy */
#define RX_CALL_ACKALL_SENT 0x40000 /* ACKALL has been sent on the call */
-
+#define RX_CALL_FLUSH 0x80000 /* Transmit queue should be flushed to peer */
#endif
if (call->error)
call->app.mode = RX_MODE_ERROR;
+ call->flags |= RX_CALL_FLUSH;
+
cp = call->app.currentPacket;
if (cp) {