예제 #1
0
int
virNetServerClientStartKeepAlive(virNetServerClientPtr client)
{
    int ret;
    virNetServerClientLock(client);
    ret = virKeepAliveStart(client->keepalive, 0, 0);
    virNetServerClientUnlock(client);
    return ret;
}
예제 #2
0
int
virNetServerClientStartKeepAlive(virNetServerClientPtr client)
{
    int ret = -1;

    virObjectLock(client);

    /* The connection might have been closed before we got here and thus the
     * keepalive object could have been removed too.
     */
    if (!client->keepalive) {
        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                       _("connection not open"));
        goto cleanup;
    }

    ret = virKeepAliveStart(client->keepalive, 0, 0);

 cleanup:
    virObjectUnlock(client);
    return ret;
}