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
FileTransferMsg GetFileListResponseMsg(char* path, char flags)
{
    FileTransferMsg fileListMsg;
    FileListInfo fileListInfo;
    int status = -1;

    memset(&fileListMsg, 0, sizeof(FileTransferMsg));
    memset(&fileListInfo, 0, sizeof(FileListInfo));

    /* fileListInfo can have null data if the folder is Empty
   or if some error condition has occurred.
   The return value is 'failure' only if some error condition has occurred.
    */
    status = CreateFileListInfo(&fileListInfo, path, !(flags & 0x10));

    if (status == FAILURE)
    {
        fileListMsg = CreateFileListErrMsg(flags);
    }
    else
    {
        /* DisplayFileList(fileListInfo); For Debugging  */

        fileListMsg = CreateFileListMsg(fileListInfo, flags);
        FreeFileListInfo(fileListInfo);
    }

    return fileListMsg;
}
/*
 * This is the method called by HandleFileListRequest to get the file list
 */
This is the method called by HandleFileListRequest to get the file list
This is the method called by HandleFileListRequest to get the file list
FileTransferMsg GetFileListResponseMsg(char* path, char flags)
{
    FileTransferMsg fileListMsg;
    FileListInfo fileListInfo;
    int status = -1;
    memset(&fileListMsg, 0, sizeof(FileTransferMsg));
    memset(&fileListInfo, 0, sizeof(FileListInfo));
    status = CreateFileListInfo(&fileListInfo, path, !(flags & 0x10));
    if (status == FAILURE)
    {
        fileListMsg = CreateFileListErrMsg(flags);
    }
    else
    {
        fileListMsg = CreateFileListMsg(fileListInfo, flags);
        FreeFileListInfo(fileListInfo);
    }
    return fileListMsg;
}
FileTransferMsg GetFileListResponseMsg ( char * path , char flags ) { FileTransferMsg fileListMsg ; FileListInfo fileListInfo ; int status = -1 ; memset ( & fileListMsg , 0 , sizeof ( FileTransferMsg ) ) ; memset ( & fileListInfo , 0 , sizeof ( FileListInfo ) ) ; status = CreateFileListInfo ( & fileListInfo , path , ! ( flags & 0x10 ) ) ; if ( status == FAILURE ) { fileListMsg = CreateFileListErrMsg ( flags ) ; } else { fileListMsg = CreateFileListMsg ( fileListInfo , flags ) ; FreeFileListInfo ( fileListInfo ) ; } return fileListMsg ; }
This is the method called by HandleFileListRequest to get the file list
This is the method called by HandleFileListRequest to get the file list
/* fileListInfo can have null data if the folder is Empty
   or if some error condition has occurred.
   The return value is 'failure' only if some error condition has occurred.
    */ /* DisplayFileList(fileListInfo); For Debugging  */