VirtualBox

vbox的更動 61644 路徑 trunk/src/VBox/Main


忽略:
時間撮記:
2016-6-10 上午06:57:56 (8 年 以前)
作者:
vboxsync
訊息:

Main/ConsoleImpl: refine error handling for enabling the VRDE server

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r61617 r61644  
    51815181    if (vrc == VERR_NET_ADDRESS_IN_USE)
    51825182    {
     5183        /* Not fatal if we start the VM, fatal if the VM is already running. */
    51835184        Bstr bstr;
    51845185        mVRDEServer->GetVRDEProperty(Bstr("TCP/Ports").raw(), bstr.asOutParam());
    51855186        errMsg = Utf8StrFmt(tr("VirtualBox Remote Desktop Extension server can't bind to the port(s): %s"),
    51865187                                Utf8Str(bstr).c_str());
    5187         LogRel(("VRDE: Warning: failed to launch VRDE server (%Rrc): '%s'\n", vrc, errMsg.c_str()));
     5188        LogRel(("VRDE: Warning: failed to launch VRDE server (%Rrc): %s\n", vrc, errMsg.c_str()));
    51885189    }
    51895190    else if (vrc == VINF_NOT_SUPPORTED)
    51905191    {
    5191         /* This means that the VRDE is not installed. */
     5192        /* This means that the VRDE is not installed.
     5193         * Not fatal if we start the VM, fatal if the VM is already running. */
    51925194        LogRel(("VRDE: VirtualBox Remote Desktop Extension is not available.\n"));
    51935195        errMsg = Utf8Str("VirtualBox Remote Desktop Extension is not available");
     
    51955197    else if (RT_FAILURE(vrc))
    51965198    {
    5197         /* Fail if the server is installed but can't start. */
     5199        /* Fail if the server is installed but can't start. Always fatal. */
    51985200        switch (vrc)
    51995201        {
    52005202            case VERR_FILE_NOT_FOUND:
    5201                 errMsg = Utf8StrFmt(tr("Could not find the VirtualBox Remote Desktop Extension library."));
     5203                errMsg = Utf8StrFmt(tr("Could not find the VirtualBox Remote Desktop Extension library"));
    52025204                break;
    52035205            default:
     
    52645266
    52655267                            int vrc = mConsoleVRDPServer->Launch();
    5266                             Utf8Str errMsg = VRDPServerErrorToMsg(vrc);
    52675268                            if (vrc != VINF_SUCCESS)
     5269                            {
     5270                                Utf8Str errMsg = VRDPServerErrorToMsg(vrc);
    52685271                                rc = setError(E_FAIL, errMsg.c_str());
     5272                            }
    52695273                            else
    52705274                                mConsoleVRDPServer->EnableConnections();
     
    95979601        alock.acquire();
    95989602
    9599         Utf8Str errMsg = pConsole->VRDPServerErrorToMsg(vrc);
    9600         if (   RT_FAILURE(vrc)
    9601             && vrc != VERR_NET_ADDRESS_IN_USE) /* this is not fatal */
    9602             throw i_setErrorStatic(E_FAIL, errMsg.c_str());
     9603        if (vrc != VINF_SUCCESS)
     9604        {
     9605            Utf8Str errMsg = pConsole->VRDPServerErrorToMsg(vrc);
     9606            if (   RT_FAILURE(vrc)
     9607                && vrc != VERR_NET_ADDRESS_IN_USE) /* not fatal */
     9608                throw i_setErrorStatic(E_FAIL, errMsg.c_str());
     9609        }
    96039610
    96049611        ComPtr<IMachine> pMachine = pConsole->i_machine();
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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