openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libvncserver/0.9.12+gitAUTOINC+c0a23857a5-r0/git/libvncserver/tightvnc-filetransfer/filetransfermsg.c
void CloseUndoneFileUpload(rfbClientPtr cl, rfbTightClientPtr rtcp)
{
    /* TODO :: File Upload case is not handled currently */
    /* TODO :: In case of concurrency we need to use Critical Section */

    if (cl == NULL)
        return;

    if (rtcp->rcft.rcfu.uploadInProgress == TRUE)
    {
        rtcp->rcft.rcfu.uploadInProgress = FALSE;

        if (rtcp->rcft.rcfu.uploadFD != -1)
        {
            close(rtcp->rcft.rcfu.uploadFD);
            rtcp->rcft.rcfu.uploadFD = -1;
        }

        if (unlink(rtcp->rcft.rcfu.fName) == -1)
        {
            rfbLog("File [%s]: Method [%s]: Delete operation on file <%s> "
                   "failed\n",
                   __FILE__, __FUNCTION__, rtcp->rcft.rcfu.fName);
        }

        memset(rtcp->rcft.rcfu.fName, 0, PATH_MAX);
    }
}
/******************************************************************************
 * Method to cancel File Transfer operation.
 ******************************************************************************/
Method to cancel File Transfer operation.
Method to cancel File Transfer operation .
void CloseUndoneFileUpload(rfbClientPtr cl, rfbTightClientPtr rtcp)
{
    if (cl == NULL)
        return;
    if (rtcp->rcft.rcfu.uploadInProgress == TRUE)
    {
        rtcp->rcft.rcfu.uploadInProgress = FALSE;
        if (rtcp->rcft.rcfu.uploadFD != -1)
        {
            close(rtcp->rcft.rcfu.uploadFD);
            rtcp->rcft.rcfu.uploadFD = -1;
        }
        if (unlink(rtcp->rcft.rcfu.fName) == -1)
        {
            rfbLog("File [%s]: Method [%s]: Delete operation on file <%s> "
                   "failed\n",
                   __FILE__, __FUNCTION__, rtcp->rcft.rcfu.fName);
        }
        memset(rtcp->rcft.rcfu.fName, 0, PATH_MAX);
    }
}
void CloseUndoneFileUpload ( rfbClientPtr cl , rfbTightClientPtr rtcp ) { if ( cl == NULL ) return ; if ( rtcp -> rcft . rcfu . uploadInProgress == TRUE ) { rtcp -> rcft . rcfu . uploadInProgress = FALSE ; if ( rtcp -> rcft . rcfu . uploadFD != -1 ) { close ( rtcp -> rcft . rcfu . uploadFD ) ; rtcp -> rcft . rcfu . uploadFD = -1 ; } if ( unlink ( rtcp -> rcft . rcfu . fName ) == -1 ) { rfbLog ( " " " \n " , __FILE__ , __FUNCTION__ , rtcp -> rcft . rcfu . fName ) ; } memset ( rtcp -> rcft . rcfu . fName , 0 , PATH_MAX ) ; } }
Method to cancel File Transfer operation.
Method to cancel File Transfer operation .
/* TODO :: File Upload case is not handled currently */ /* TODO :: In case of concurrency we need to use Critical Section */