summaryrefslogtreecommitdiff
path: root/examples/simple_talker
diff options
context:
space:
mode:
authorJean-Baptiste Maillet <jean-baptiste.maillet@parrot.com>2014-12-05 17:01:50 +0100
committerJean-Baptiste Maillet <jean-baptiste.maillet@parrot.com>2014-12-05 17:01:50 +0100
commit4e20fe6ad03ff3ba1695a29243c2998d83db73a6 (patch)
tree3f1b9bf47355078d69dff845669e7f8875e9b9b1 /examples/simple_talker
parent003dd36a9a077022647d2dc83bd090676853e0fb (diff)
downloadOpen-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-xexamples/simple_talker/simple_talker.c14
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);