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

@ -31,6 +31,7 @@ int main (int argc, char ** argv)
DDS_FATAL("dds_create_write: %s\n", dds_strretcode(-writer));
printf("=== [Publisher] Waiting for a reader to be discovered ...\n");
fflush (stdout);
rc = dds_set_status_mask(writer, DDS_PUBLICATION_MATCHED_STATUS);
if (rc != DDS_RETCODE_OK)
@ -52,6 +53,7 @@ int main (int argc, char ** argv)
printf ("=== [Publisher] Writing : ");
printf ("Message (%d, %s)\n", msg.userID, msg.message);
fflush (stdout);
rc = dds_write (writer, &msg);
if (rc != DDS_RETCODE_OK)