Changeset 77662 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.c
- Timestamp:
- Mar 12, 2019 12:40:12 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776 /vendor/edk2/current 103735-103757,103769-103776,129194-129237
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.c
r58466 r77662 3 3 It provides the helper routines to access TCP service. 4 4 5 Copyright (c) 2010 - 201 1, Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR> 6 6 This program and the accompanying materials 7 7 are licensed and made available under the terms and conditions of the BSD License … … 531 531 532 532 @param[in, out] TcpIo The TcpIo wrapping the TCP socket. 533 @param[in] Timeout The time to wait for connection done. 533 @param[in] Timeout The time to wait for connection done. Set to NULL for infinite wait. 534 534 535 535 @retval EFI_SUCCESS Connect to the other endpoint of the TCP socket … … 547 547 TcpIoConnect ( 548 548 IN OUT TCP_IO *TcpIo, 549 IN EFI_EVENT Timeout 549 IN EFI_EVENT Timeout OPTIONAL 550 550 ) 551 551 { … … 577 577 } 578 578 579 while (!TcpIo->IsConnDone && EFI_ERROR (gBS->CheckEvent (Timeout))) {579 while (!TcpIo->IsConnDone && ((Timeout == NULL) || EFI_ERROR (gBS->CheckEvent (Timeout)))) { 580 580 if (TcpIo->TcpVersion == TCP_VERSION_4) { 581 581 Tcp4->Poll (Tcp4); … … 586 586 587 587 if (!TcpIo->IsConnDone) { 588 if (TcpIo->TcpVersion == TCP_VERSION_4) { 589 Tcp4->Cancel (Tcp4, &TcpIo->ConnToken.Tcp4Token.CompletionToken); 590 } else { 591 Tcp6->Cancel (Tcp6, &TcpIo->ConnToken.Tcp6Token.CompletionToken); 592 } 588 593 Status = EFI_TIMEOUT; 589 594 } else { … … 598 603 599 604 @param[in, out] TcpIo The TcpIo wrapping the TCP socket. 600 @param[in] Timeout The time to wait for connection done. 605 @param[in] Timeout The time to wait for connection done. Set to NULL for infinite wait. 601 606 602 607 … … 616 621 TcpIoAccept ( 617 622 IN OUT TCP_IO *TcpIo, 618 IN EFI_EVENT Timeout 623 IN EFI_EVENT Timeout OPTIONAL 619 624 ) 620 625 { … … 647 652 } 648 653 649 while (!TcpIo->IsListenDone && EFI_ERROR (gBS->CheckEvent (Timeout))) {654 while (!TcpIo->IsListenDone && ((Timeout == NULL) || EFI_ERROR (gBS->CheckEvent (Timeout)))) { 650 655 if (TcpIo->TcpVersion == TCP_VERSION_4) { 651 656 Tcp4->Poll (Tcp4); … … 656 661 657 662 if (!TcpIo->IsListenDone) { 663 if (TcpIo->TcpVersion == TCP_VERSION_4) { 664 Tcp4->Cancel (Tcp4, &TcpIo->ListenToken.Tcp4Token.CompletionToken); 665 } else { 666 Tcp6->Cancel (Tcp6, &TcpIo->ListenToken.Tcp6Token.CompletionToken); 667 } 658 668 Status = EFI_TIMEOUT; 659 669 } else { … … 861 871 @param[in] AsyncMode Is this receive asyncronous or not. 862 872 @param[in] Timeout The time to wait for receiving the amount of data the Packet 863 can hold. 873 can hold. Set to NULL for infinite wait. 864 874 865 875 @retval EFI_SUCCESS The required amount of data is received from the socket. … … 878 888 IN NET_BUF *Packet, 879 889 IN BOOLEAN AsyncMode, 880 IN EFI_EVENT Timeout 890 IN EFI_EVENT Timeout OPTIONAL 881 891 ) 882 892 {
Note:
See TracChangeset
for help on using the changeset viewer.