From 174f03d2a2851d426b57bc6c35d2f08a884ecffc Mon Sep 17 00:00:00 2001 From: vanjeff Date: Mon, 28 Jul 2008 09:33:02 +0000 Subject: fixed one bug to catch the return status. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5582 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'MdeModulePkg/Universal/Network') diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c index 3c2b4e1019..a0ec216e07 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c @@ -747,6 +747,11 @@ Mtftp4Start ( goto ON_ERROR; } + // + // Set initial status. + // + Token->Status = EFI_NOT_READY; + // // Build and send an initial requests // @@ -761,16 +766,15 @@ Mtftp4Start ( if (EFI_ERROR (Status)) { goto ON_ERROR; } - // - // Return immediately for asynchronous operation or poll the - // instance for synchronous operation. - // - Token->Status = EFI_NOT_READY; if (Token->Event != NULL) { return EFI_SUCCESS; } + // + // Return immediately for asynchronous operation or poll the + // instance for synchronous operation. + // while (Token->Status == EFI_NOT_READY) { This->Poll (This); } -- cgit v1.2.3