Пример #1
0
void rtp_log_write(char *prompt, void *pData, long nBytes)
{
    if (debugfd_valid)
    {
        unsigned long elapsed;
        char outbuff[256];
        elapsed = rtp_get_system_msec () - start_system_msec;
        rtp_sprintf(outbuff,"\r\n ==<%s (t=%8d) (c=%4d) >== \r\n", (const unsigned char*) prompt,elapsed, nBytes);
        rtp_file_write (debugfd, (const unsigned char*) outbuff, (long) rtp_strlen(outbuff));
        if (pData && nBytes > 0)
        {
            rtp_file_write (debugfd, (const unsigned char*) pData, (long) nBytes);
            rtp_sprintf(outbuff,"\r\n ==<===========================================>==\r\n");
            rtp_file_write (debugfd, (const unsigned char*) outbuff, (long) rtp_strlen(outbuff));
        }
        rtp_file_flush (debugfd);
    }
}
Пример #2
0
BBOOL rtplatform_flush(int fd)
{
    return (BBOOL) rtp_file_flush((RTP_HANDLE) fd);
}