VirtualBox

Ignore:
Timestamp:
Mar 12, 2019 12:40:12 PM (6 years ago)
Author:
vboxsync
Message:

EFI: First step in UDK2018 merge. Does not build yet.

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.c

    r58466 r77662  
    33  It provides the helper routines to access TCP service.
    44
    5 Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
     5Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
    66This program and the accompanying materials
    77are licensed and made available under the terms and conditions of the BSD License
     
    531531
    532532  @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.
    534534
    535535  @retval EFI_SUCCESS            Connect to the other endpoint of the TCP socket
     
    547547TcpIoConnect (
    548548  IN OUT TCP_IO             *TcpIo,
    549   IN     EFI_EVENT          Timeout
     549  IN     EFI_EVENT          Timeout        OPTIONAL
    550550  )
    551551{
     
    577577  }
    578578
    579   while (!TcpIo->IsConnDone && EFI_ERROR (gBS->CheckEvent (Timeout))) {
     579  while (!TcpIo->IsConnDone && ((Timeout == NULL) || EFI_ERROR (gBS->CheckEvent (Timeout)))) {
    580580    if (TcpIo->TcpVersion == TCP_VERSION_4) {
    581581      Tcp4->Poll (Tcp4);
     
    586586
    587587  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    }
    588593    Status = EFI_TIMEOUT;
    589594  } else {
     
    598603
    599604  @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.
    601606
    602607
     
    616621TcpIoAccept (
    617622  IN OUT TCP_IO             *TcpIo,
    618   IN     EFI_EVENT          Timeout
     623  IN     EFI_EVENT          Timeout        OPTIONAL
    619624  )
    620625{
     
    647652  }
    648653
    649   while (!TcpIo->IsListenDone && EFI_ERROR (gBS->CheckEvent (Timeout))) {
     654  while (!TcpIo->IsListenDone && ((Timeout == NULL) || EFI_ERROR (gBS->CheckEvent (Timeout)))) {
    650655    if (TcpIo->TcpVersion == TCP_VERSION_4) {
    651656      Tcp4->Poll (Tcp4);
     
    656661
    657662  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    }
    658668    Status = EFI_TIMEOUT;
    659669  } else {
     
    861871  @param[in]       AsyncMode   Is this receive asyncronous or not.
    862872  @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.
    864874
    865875  @retval EFI_SUCCESS            The required amount of data is received from the socket.
     
    878888  IN     NET_BUF            *Packet,
    879889  IN     BOOLEAN            AsyncMode,
    880   IN     EFI_EVENT          Timeout
     890  IN     EFI_EVENT          Timeout       OPTIONAL
    881891  )
    882892{
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette