VirtualBox

Changeset 300 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 25, 2007 2:30:37 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
17847
Message:

Another attempt to solve the VRDP initialization problem

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

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

    r299 r300  
    30203020            {
    30213021                rc = E_FAIL;
     3022            }
     3023            else
     3024            {
     3025                mConsoleVRDPServer->SetCallback ();
    30223026            }
    30233027        }
     
    61686172        }
    61696173
    6170         /*
    6171          * Create the VM
    6172          */
    6173         PVM pVM;
    6174         /*
    6175          *  leave the lock since EMT will call Console. It's safe because
    6176          *  mMachineState is either Starting or Restoring state here.
    6177          */
    6178         alock.leave();
    6179 
    6180         vrc = VMR3Create (task->mSetVMErrorCallback, task.get(),
    6181                           task->mConfigConstructor, task.get(),
    6182                           &pVM);
    6183 
    6184         alock.enter();
    6185 
    61866174#ifdef VBOX_VRDP
    61876175        if (VBOX_SUCCESS (vrc))
    61886176        {
    6189             /* Start the VRDP server after the VM is created. */
     6177            /* Create the VRDP server. In case of headless operation, this will
     6178             * also create the framebuffer, required at VM creation.
     6179             */
    61906180            ConsoleVRDPServer *server = console->consoleVRDPServer();
    61916181            Assert (server);
     
    62166206                         vrc, errMsg.raw()));
    62176207                hrc = setError (E_FAIL, errMsg);
     6208                break;
    62186209            }
     6210        }
     6211#endif /* VBOX_VRDP */
     6212
     6213        /*
     6214         * Create the VM
     6215         */
     6216        PVM pVM;
     6217        /*
     6218         *  leave the lock since EMT will call Console. It's safe because
     6219         *  mMachineState is either Starting or Restoring state here.
     6220         */
     6221        alock.leave();
     6222
     6223        vrc = VMR3Create (task->mSetVMErrorCallback, task.get(),
     6224                          task->mConfigConstructor, task.get(),
     6225                          &pVM);
     6226
     6227        alock.enter();
     6228
     6229#ifdef VBOX_VRDP
     6230        {
     6231            /* Enable client connections to the server. */
     6232            ConsoleVRDPServer *server = console->consoleVRDPServer();
     6233            server->SetCallback ();
    62196234        }
    62206235#endif /* VBOX_VRDP */
  • trunk/src/VBox/Main/ConsoleVRDPServer.cpp

    r1 r300  
    127127                framebuffer? VRDP_EXTERNAL_FRAMEBUFFER: VRDP_INTERNAL_FRAMEBUFFER);
    128128
    129             mpfnVRDPSetCallback (mhServer, mConsole->getVrdpServerCallback (), mConsole);
    130 
    131129            LogFlow(("Framebuffer %p set for the VRDP server\n", framebuffer));
    132130           
     
    144142#endif
    145143    return rc;
     144}
     145
     146void ConsoleVRDPServer::SetCallback (void)
     147{
     148    /* This is called after VM is created and allows the server to accept client connection. */
     149    if (mhServer && mpfnVRDPSetCallback)
     150    {
     151        mpfnVRDPSetCallback (mhServer, mConsole->getVrdpServerCallback (), mConsole);
     152    }
    146153}
    147154
  • trunk/src/VBox/Main/include/ConsoleVRDPServer.h

    r1 r300  
    3838
    3939    int Launch (void);
     40    void SetCallback (void);
    4041    void Stop (void);
    4142
Note: See TracChangeset for help on using the changeset viewer.

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