VirtualBox

Changeset 28640 in vbox


Ignore:
Timestamp:
Apr 23, 2010 12:48:11 PM (15 years ago)
Author:
vboxsync
Message:

Guest Control: Update (only complete progress once).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/GuestImpl.cpp

    r28638 r28640  
    535535
    536536            case PROC_STS_TEN: /* Terminated normally. */
    537                 it->pProgress->notifyComplete(S_OK);
     537                if (!it->pProgress->getCompleted())
     538                    it->pProgress->notifyComplete(S_OK);
    538539                break;
    539540
     
    567568            && errMsg.length())
    568569        {
    569             it->pProgress->notifyComplete(E_FAIL /** @todo Find a better rc! */, COM_IIDOF(IGuest),
    570                                           (CBSTR)Guest::getComponentName(), errMsg.c_str());
     570            if (!it->pProgress->getCompleted())
     571            {
     572                it->pProgress->notifyComplete(E_FAIL /** @todo Find a better rc! */, COM_IIDOF(IGuest),
     573                                              (CBSTR)Guest::getComponentName(), errMsg.c_str());
     574                LogFlowFunc(("Callback (context ID=%u, status=%u) progress marked as completed\n",
     575                             pData->hdr.u32ContextID, pData->u32Status));
     576            }
     577            else
     578                LogFlowFunc(("Callback (context ID=%u, status=%u) progress already marked as completed\n",
     579                             pData->hdr.u32ContextID, pData->u32Status));
    571580        }
    572581        ASMAtomicWriteBool(&it->bCalled, true);
     
    655664
    656665        /* Notify outstanding waits for progress ... */
    657         if (!it->pProgress.isNull())
     666        if (   !it->pProgress.isNull()
     667            && !it->pProgress->getCompleted())
    658668        {
    659669            it->pProgress->notifyComplete(S_OK);
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