VirtualBox

Changeset 31738 in vbox


Ignore:
Timestamp:
Aug 17, 2010 4:12:51 PM (14 years ago)
Author:
vboxsync
Message:

FT updates

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/FTM.cpp

    r31737 r31738  
    2727#include <VBox/param.h>
    2828#include <VBox/ssm.h>
     29#include <VBox/log.h>
    2930
    3031#include <iprt/assert.h>
     
    3233#include <iprt/string.h>
    3334#include <iprt/mem.h>
    34 #include <VBox/log.h>
     35#include <iprt/tcp.h>
    3536
    3637/**
     
    8081
    8182/**
     83 * Listen for incoming traffic destined for the standby VM.
     84 *
     85 * @copydoc FNRTTCPSERVE
     86 *
     87 * @returns VINF_SUCCESS or VERR_TCP_SERVER_STOP.
     88 */
     89static DECLCALLBACK(int) ftmR3StandbyServeConnection(RTSOCKET Sock, void *pvUser)
     90{
     91    PVM pVM = (PVM)pvUser;
     92
     93    /*
     94     * Disable Nagle.
     95     */
     96    int rc = RTTcpSetSendCoalescing(Sock, false /*fEnable*/);
     97    AssertRC(rc);
     98
     99    return VINF_SUCCESS;
     100}
     101
     102/**
    82103 * Powers on the fault tolerant virtual machine.
    83104 *
     
    119140    {
    120141        /* standby */
     142        PRTTCPSERVER hServer;
     143
     144        rc = RTTcpServerCreateEx(pszAddress, uPort, &hServer);
     145        if (RT_FAILURE(rc))
     146            return rc;
     147
     148        rc = RTTcpServerListen(hServer, ftmR3StandbyServeConnection, pVM);
     149        /** @todo deal with the exit code to check if we should activate this standby VM. */
     150
     151        RTTcpServerDestroy(hServer);
    121152    }
    122153    return VERR_NOT_IMPLEMENTED;
  • trunk/src/VBox/VMM/FTMInternal.h

    r31734 r31738  
    3939    unsigned    uPort;
    4040    unsigned    uInterval;
     41
    4142} FTM;
    4243
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