VirtualBox

Changeset 6347

Show
Ignore:
Timestamp:
01/11/08 21:17:34 (11 months ago)
Author:
vboxsync
Message:

VMM: don't overwrite errors

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/VBox/VMM/VM.cpp

    r6300 r6347  
    274274                                AssertMsgFailed(("Add error message for rc=%d (%Vrc)\n", rc, rc)); 
    275275                        } 
    276                         if (pszError
     276                        if (pszError && !pVM->vm.s.fErrorSet
    277277                            vmR3CallVMAtError(pfnVMAtError, pvUserVM, rc, RT_SRC_POS, pszError, rc); 
    278278 
     
    26032603 
    26042604    /* 
     2605     * Prevent overwriting of the previous error. 
     2606     */ 
     2607    if (pVM->vm.s.fErrorSet) 
     2608        return; 
     2609 
     2610    pVM->vm.s.fErrorSet = true; 
     2611 
     2612    /* 
    26052613     * Make a copy of the message. 
    26062614     */ 
  • trunk/src/VBox/VMM/VMInternal.h

    r5999 r6347  
    238238    /** List of registered error callbacks. */ 
    239239    R3PTRTYPE(PVMATERROR *)         ppAtErrorNext; 
     240    /** Ignore all but the first error */ 
     241    bool                            fErrorSet; 
    240242 
    241243    /** List of registered error callbacks. */ 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy