Marker output was clipped to 64 characters,
and new line was not inserted.
Changed to use asprintf rather than fixed size buffer.
Marker output is now properly outputting 1 per line.
Change-Id: Id7970486dff11f28ed41315c774509577b9ea32d
if(mConsoleClient)
{
// write out the time stamp
- char buffer[64];
+ char *buffer;
double usec = marker.GetTimeStamp().microseconds;
- int size = snprintf(buffer, sizeof(buffer), "%.6f (seconds), %s\n", usec * MICROSECONDS_TO_SECOND, description);
-
- return mSocket->Write(buffer, size);
+ int size = asprintf(&buffer, "%.6f (seconds), %s\n", usec * MICROSECONDS_TO_SECOND, description);
+ auto retVal = mSocket->Write(buffer, size);
+ free(buffer);
+ return retVal;
}
// todo serialize the data