diff options
author | Jean-Baptiste Maillet <jean-baptiste.maillet@parrot.com> | 2014-12-05 17:01:50 +0100 |
---|---|---|
committer | Jean-Baptiste Maillet <jean-baptiste.maillet@parrot.com> | 2014-12-05 17:01:50 +0100 |
commit | 4e20fe6ad03ff3ba1695a29243c2998d83db73a6 (patch) | |
tree | 3f1b9bf47355078d69dff845669e7f8875e9b9b1 /examples/simple_talker | |
parent | 003dd36a9a077022647d2dc83bd090676853e0fb (diff) | |
download | Open-AVB-4e20fe6ad03ff3ba1695a29243c2998d83db73a6.tar.gz |
simple_talker: bugfix, MRP func returns 1500 for success
Bug introduced by coverity fixes. This historical API goes
against the principle of least surprise, to be discussed.
For now, this commit will bring back 2 coverity defects but
workaround the bug.
Diffstat (limited to 'examples/simple_talker')
-rwxr-xr-x | examples/simple_talker/simple_talker.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/examples/simple_talker/simple_talker.c b/examples/simple_talker/simple_talker.c index aab1f475..d465b5a6 100755 --- a/examples/simple_talker/simple_talker.c +++ b/examples/simple_talker/simple_talker.c @@ -577,11 +577,7 @@ int main(int argc, char *argv[]) printf("detected domain Class A PRIO=%d VID=%04x...\n", domain_class_a_priority, domain_class_a_vid); - err = mrp_register_domain(&domain_class_a_id, &domain_class_a_priority, &domain_class_a_vid); - if (err) { - printf("mrp_register_domain failed\n"); - return EXIT_FAILURE; - } + mrp_register_domain(&domain_class_a_id, &domain_class_a_priority, &domain_class_a_vid); mrp_join_vlan(); @@ -742,7 +738,7 @@ int main(int argc, char *argv[]) */ fprintf(stderr, "advertising stream ...\n"); if( transport == 2 ) { - err = mrp_advertise_stream(glob_stream_id, dest_addr, + mrp_advertise_stream(glob_stream_id, dest_addr, domain_class_a_vid, PKT_SZ - 16, L2_PACKET_IPG / 125000, domain_class_a_priority, 3900); @@ -752,16 +748,12 @@ int main(int argc, char *argv[]) * not allowed, not sure the significance of the value 6, but * using it consistently */ - err = mrp_advertise_stream(glob_stream_id, dest_addr, + mrp_advertise_stream(glob_stream_id, dest_addr, domain_class_a_vid, sizeof(*l4_headers) + L4_SAMPLES_PER_FRAME * CHANNELS * 2 + 6, 1, domain_class_a_priority, 3900); } - if (err) { - printf("mrp_advertise_stream failed\n"); - return EXIT_FAILURE; - } fprintf(stderr, "awaiting a listener ...\n"); mrp_await_listener(glob_stream_id); |