aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples/rx_samples_c.c
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2015-08-07 10:25:27 -0700
committerMartin Braun <martin.braun@ettus.com>2015-08-07 11:23:59 -0700
commitf1ebf688291a8f3026940125b2af50e069272fd8 (patch)
treeee5811707fd80e82d68fb1167e8e36ca6bb67dd0 /host/examples/rx_samples_c.c
parentc2827e9a0bcfe9c2dd2e4dd5d68f895384564ec6 (diff)
downloaduhd-f1ebf688291a8f3026940125b2af50e069272fd8.tar.gz
uhd-f1ebf688291a8f3026940125b2af50e069272fd8.tar.bz2
uhd-f1ebf688291a8f3026940125b2af50e069272fd8.zip
C API: feature additions, bugfixes
* Wrapped uhd::device_addrs_t, added find functions for multi_usrp, multi_usrp_clock * Replaced getopt with public domain implementation * Minor bugfixes
Diffstat (limited to 'host/examples/rx_samples_c.c')
-rw-r--r--host/examples/rx_samples_c.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/host/examples/rx_samples_c.c b/host/examples/rx_samples_c.c
index 0be0d8afe..b5882b79b 100644
--- a/host/examples/rx_samples_c.c
+++ b/host/examples/rx_samples_c.c
@@ -108,19 +108,19 @@ int main(int argc, char* argv[])
// Create USRP
uhd_usrp_handle usrp;
fprintf(stderr, "Creating USRP with args \"%s\"...\n", device_args);
- EXECUTE_OR_GOTO(free_usrp,
+ EXECUTE_OR_GOTO(free_option_strings,
uhd_usrp_make(&usrp, device_args)
)
// Create RX streamer
uhd_rx_streamer_handle rx_streamer;
- EXECUTE_OR_GOTO(free_rx_streamer,
+ EXECUTE_OR_GOTO(free_usrp,
uhd_rx_streamer_make(&rx_streamer)
)
// Create RX metadata
uhd_rx_metadata_handle md;
- EXECUTE_OR_GOTO(free_rx_metadata,
+ EXECUTE_OR_GOTO(free_rx_streamer,
uhd_rx_metadata_make(&md)
)
@@ -272,7 +272,7 @@ int main(int argc, char* argv[])
if(verbose){
fprintf(stderr, "Cleaning up USRP.\n");
}
- if(return_code != EXIT_SUCCESS){
+ if(return_code != EXIT_SUCCESS && usrp != NULL){
uhd_usrp_last_error(usrp, error_string, 512);
fprintf(stderr, "USRP reported the following error: %s\n", error_string);
}