void rdma_start_incoming_migration(const char *host_port, Error **errp)

{

    int ret;

    RDMAContext *rdma;

    Error *local_err = NULL;



    DPRINTF("Starting RDMA-based incoming migration\n");

    rdma = qemu_rdma_data_init(host_port, &local_err);



    if (rdma == NULL) {

        goto err;

    }



    ret = qemu_rdma_dest_init(rdma, &local_err);



    if (ret) {

        goto err;

    }



    DPRINTF("qemu_rdma_dest_init success\n");



    ret = rdma_listen(rdma->listen_id, 5);



    if (ret) {

        ERROR(errp, "listening on socket!");

        goto err;

    }



    DPRINTF("rdma_listen success\n");



    qemu_set_fd_handler2(rdma->channel->fd, NULL,

                         rdma_accept_incoming_migration, NULL,

                            (void *)(intptr_t) rdma);

    return;

err:

    error_propagate(errp, local_err);

    g_free(rdma);

}

void rdma_start_incoming_migration(const char *host_port, Error **errp)

{

    int ret;

    RDMAContext *rdma;

    Error *local_err = NULL;



    DPRINTF("Starting RDMA-based incoming migration\n");

    rdma = qemu_rdma_data_init(host_port, &local_err);



    if (rdma == NULL) {

        goto err;

    }



    ret = qemu_rdma_dest_init(rdma, &local_err);



    if (ret) {

        goto err;

    }



    DPRINTF("qemu_rdma_dest_init success\n");



    ret = rdma_listen(rdma->listen_id, 5);



    if (ret) {

        ERROR(errp, "listening on socket!");

        goto err;

    }



    DPRINTF("rdma_listen success\n");



    qemu_set_fd_handler2(rdma->channel->fd, NULL,

                         rdma_accept_incoming_migration, NULL,

                            (void *)(intptr_t) rdma);

    return;

err:

    error_propagate(errp, local_err);

    g_free(rdma);

}

void FUNC_0(const char *VAR_0, Error **VAR_1)

{

    int VAR_2;

    RDMAContext *rdma;

    Error *local_err = NULL;



    DPRINTF("Starting RDMA-based incoming migration\n");

    rdma = qemu_rdma_data_init(VAR_0, &local_err);



    if (rdma == NULL) {

        goto err;

    }



    VAR_2 = qemu_rdma_dest_init(rdma, &local_err);



    if (VAR_2) {

        goto err;

    }



    DPRINTF("qemu_rdma_dest_init success\n");



    VAR_2 = rdma_listen(rdma->listen_id, 5);



    if (VAR_2) {

        ERROR(VAR_1, "listening on socket!");

        goto err;

    }



    DPRINTF("rdma_listen success\n");



    qemu_set_fd_handler2(rdma->channel->fd, NULL,

                         rdma_accept_incoming_migration, NULL,

                            (void *)(intptr_t) rdma);

    return;

err:

    error_propagate(VAR_1, local_err);

    g_free(rdma);

}

void FUNC_0(const char *VAR_0, Error **VAR_1)
{ int VAR_2; RDMAContext *rdma; Error *local_err = NULL; DPRINTF("Starting RDMA-based incoming migration\n"); rdma = qemu_rdma_data_init(VAR_0, &local_err); if (rdma == NULL) { goto err; } VAR_2 = qemu_rdma_dest_init(rdma, &local_err); if (VAR_2) { goto err; } DPRINTF("qemu_rdma_dest_init success\n"); VAR_2 = rdma_listen(rdma->listen_id, 5); if (VAR_2) { ERROR(VAR_1, "listening on socket!"); goto err; } DPRINTF("rdma_listen success\n"); qemu_set_fd_handler2(rdma->channel->fd, NULL,
rdma_accept_incoming_migration, NULL,
(void *)(intptr_t) rdma); return; err:
error_propagate(VAR_1, local_err); g_free(rdma); }