Skip to content

Commit

Permalink
Disable UDP options on platforms where it's not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmehall authored and LorenzMeier committed Mar 19, 2016
1 parent 0cc3b4b commit afa06ba
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/modules/mavlink/mavlink_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1543,6 +1543,7 @@ Mavlink::task_main(int argc, char *argv[])
set_protocol(SERIAL);
break;

#ifdef __PX4_POSIX
case 'u':
temp_int_arg = strtoul(myoptarg, &eptr, 10);
if ( *eptr == '\0' ) {
Expand Down Expand Up @@ -1575,6 +1576,14 @@ Mavlink::task_main(int argc, char *argv[])
err_flag = true;
}
break;
#else
case 'u':
case 'o':
case 't':
warnx("UDP options not supported on this platform");
err_flag = true;
break;
#endif

// case 'e':
// mavlink_link_termination_allowed = true;
Expand Down

0 comments on commit afa06ba

Please sign in to comment.