static int send_status(int sockfd, struct iovec *iovec, int status)

{

    ProxyHeader header;

    int retval, msg_size;



    if (status < 0) {

        header.type = T_ERROR;

    } else {

        header.type = T_SUCCESS;


    header.size = sizeof(status);

    /*

     * marshal the return status. We don't check error.

     * because we are sure we have enough space for the status

     */

    msg_size = proxy_marshal(iovec, 0, "ddd", header.type,

                             header.size, status);




    retval = socket_write(sockfd, iovec->iov_base, msg_size);

    if (retval < 0) {

        return retval;


    return 0;

static int send_status(int sockfd, struct iovec *iovec, int status)

{

    ProxyHeader header;

    int retval, msg_size;



    if (status < 0) {

        header.type = T_ERROR;

    } else {

        header.type = T_SUCCESS;


    header.size = sizeof(status);

    







    msg_size = proxy_marshal(iovec, 0, "ddd", header.type,

                             header.size, status);




    retval = socket_write(sockfd, iovec->iov_base, msg_size);

    if (retval < 0) {

        return retval;


    return 0;

static int FUNC_0(int VAR_0, struct VAR_1 *VAR_1, int VAR_2)

{

    ProxyHeader header;

    int VAR_3, VAR_4;



    if (VAR_2 < 0) {

        header.type = T_ERROR;

    } else {

        header.type = T_SUCCESS;


    header.size = sizeof(VAR_2);

    







    VAR_4 = proxy_marshal(VAR_1, 0, "ddd", header.type,

                             header.size, VAR_2);




    VAR_3 = socket_write(VAR_0, VAR_1->iov_base, VAR_4);

    if (VAR_3 < 0) {

        return VAR_3;


    return 0;

static int FUNC_0(int VAR_0, struct VAR_1 *VAR_1, int VAR_2)
{ ProxyHeader header; int VAR_3, VAR_4; if (VAR_2 < 0) { header.type = T_ERROR; } else { header.type = T_SUCCESS; header.size = sizeof(VAR_2); VAR_4 = proxy_marshal(VAR_1, 0, "ddd", header.type,
header.size, VAR_2); VAR_3 = socket_write(VAR_0, VAR_1->iov_base, VAR_4); if (VAR_3 < 0) { return VAR_3; return 0;