Skip to content

Commit

Permalink
Hotfix example pubsub index. (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemunozm authored and julionce committed Apr 8, 2019
1 parent 9a6dee2 commit 1a113ee
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions examples/PublishHelloWorld/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,15 @@ int main(int args, char** argv)
uint32_t count = 0;
while(connected && count < max_topics)
{
HelloWorld topic = {count++, "Hello DDS world!"};
HelloWorld topic = {++count, "Hello DDS world!"};

ucdrBuffer mb;
uint32_t topic_size = HelloWorld_size_of_topic(&topic, 0);
uxr_prepare_output_stream(&session, reliable_out, datawriter_id, &mb, topic_size);
HelloWorld_serialize_topic(&mb, &topic);

printf("Send topic: %s, id: %i\n", topic.message, topic.index);
connected = uxr_run_session_time(&session, 1000);
if(connected)
{
printf("Sent topic: %s, id: %i\n", topic.message, topic.index);
}
}

// Delete resources
Expand Down

0 comments on commit 1a113ee

Please sign in to comment.