Beispiel #1
0
static void Handle_FileTest
(
    le_msg_MessageRef_t _msgRef
)
{
    // Get the message buffer pointer
    __attribute__((unused)) uint8_t* _msgBufPtr = ((_Message_t*)le_msg_GetPayloadPtr(_msgRef))->buffer;

    // Unpack the input parameters from the message
    int dataFile;
    dataFile = le_msg_GetFd(_msgRef);

    // Call the function
    FileTest ( (ServerCmdRef_t)_msgRef, dataFile );
}
Beispiel #2
0
static void Handle_FileTest
(
    le_msg_MessageRef_t _msgRef

)
{
    // Get the message buffer pointer
    uint8_t* _msgBufPtr = ((_Message_t*)le_msg_GetPayloadPtr(_msgRef))->buffer;

    // Needed if we are returning a result or output values
    uint8_t* _msgBufStartPtr = _msgBufPtr;

    // Unpack the input parameters from the message
    int dataFile;
    dataFile = le_msg_GetFd(_msgRef);


    // Define storage for output parameters
    int dataOut;

    // Call the function
    FileTest ( dataFile, &dataOut );


    // Re-use the message buffer for the response
    _msgBufPtr = _msgBufStartPtr;


    // Pack any "out" parameters
    le_msg_SetFd(_msgRef, dataOut);

    // Return the response
    LE_DEBUG("Sending response to client session %p : %ti bytes sent",
             le_msg_GetSession(_msgRef),
             _msgBufPtr-_msgBufStartPtr);
    le_msg_Respond(_msgRef);
}