|
@@ -418,9 +418,16 @@ static int tftp_send_ack ( struct tftp_request *tftp ) {
|
418
|
418
|
*/
|
419
|
419
|
static int tftp_send_packet ( struct tftp_request *tftp ) {
|
420
|
420
|
|
421
|
|
- /* Update retransmission timer */
|
|
421
|
+ /* Update retransmission timer. While name resolution takes place the
|
|
422
|
+ * window is zero. Avoid unnecessary delay after name resolution
|
|
423
|
+ * completes by retrying immediately.
|
|
424
|
+ */
|
422
|
425
|
stop_timer ( &tftp->timer );
|
423
|
|
- start_timer ( &tftp->timer );
|
|
426
|
+ if ( xfer_window ( &tftp->socket ) ) {
|
|
427
|
+ start_timer ( &tftp->timer );
|
|
428
|
+ } else {
|
|
429
|
+ start_timer_nodelay ( &tftp->timer );
|
|
430
|
+ }
|
424
|
431
|
|
425
|
432
|
/* Send RRQ or ACK as appropriate */
|
426
|
433
|
if ( ! tftp->peer.st_family ) {
|