aboutsummaryrefslogtreecommitdiffstats
path: root/binding/radio_impl_rtlsdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'binding/radio_impl_rtlsdr.c')
-rw-r--r--binding/radio_impl_rtlsdr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/binding/radio_impl_rtlsdr.c b/binding/radio_impl_rtlsdr.c
index 7fd4d69..b8b2454 100644
--- a/binding/radio_impl_rtlsdr.c
+++ b/binding/radio_impl_rtlsdr.c
@@ -125,7 +125,7 @@ static pid_t popen2(char *command, int *in_fd, int *out_fd)
return pid;
}
-static int rtlsdr_init(void)
+static int rtlsdr_init(const char *output)
{
GKeyFile *conf_file;
char *value_str;
@@ -183,6 +183,12 @@ static int rtlsdr_init(void)
return -1;
}
+ if(output) {
+ // Indicate desired output to helper
+ AFB_INFO("Setting RADIO_OUTPUT=%s", output);
+ setenv("RADIO_OUTPUT", output, 1);
+ }
+
// Run helper
if(snprintf(helper_path, PATH_MAX, "%s/bin/%s", rootdir, HELPER_NAME) == PATH_MAX) {
AFB_ERROR("Could not create path to %s", HELPER_NAME);