using explicit fflush instead of setvbuf (#133)

Because line-buffering doesn't exist on Windows ...

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-03-23 12:59:31 +01:00
parent 959a096372
commit c39cc74e13
6 changed files with 133 additions and 30 deletions

View file

@ -40,6 +40,7 @@ int main (int argc, char ** argv)
dds_delete_qos(qos);
printf ("\n=== [Subscriber] Waiting for a sample ...\n");
fflush (stdout);
/* Initialize sample buffer, by pointing the void pointer within
* the buffer array to a valid sample memory location. */
@ -61,6 +62,7 @@ int main (int argc, char ** argv)
msg = (HelloWorldData_Msg*) samples[0];
printf ("=== [Subscriber] Received : ");
printf ("Message (%d, %s)\n", msg->userID, msg->message);
fflush (stdout);
break;
}
else