Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Commit

Permalink
whoops, missed testing the Daemon mode, fixed now!
Browse files Browse the repository at this point in the history
  • Loading branch information
pwarren committed Jan 21, 2014
1 parent 0c007e9 commit 8a3e0b3
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/brf_entropy.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ static void *rx_stream_callback(struct bladerf *dev,
fclose(output);
log_line(LOG_DEBUG, "Waiting for a Reader...");
output = fopen(DEFAULT_OUT_FILE,"w");
/* only quit on sigpipe in daemon mode */
if (output == NULL) {
return NULL;
}
return samples;
} else {
return NULL;
Expand Down Expand Up @@ -345,11 +347,6 @@ int main(int argc, char **argv) {
}
log_line(LOG_INFO,"Options parsed, continuing.");

if (gflags_detach)
route_output();

if (!redirect_output)
output = stdout;
#ifndef __APPLE__
if (uid != -1 && gid != -1)
drop_privs(uid, gid);
Expand Down Expand Up @@ -442,7 +439,12 @@ int main(int argc, char **argv) {

log_line(LOG_DEBUG, "Doing FIPS init");
fips_init(&fipsctx, (int)0);


if (gflags_detach)
route_output();
if (!redirect_output)
output = stdout;

log_line(LOG_DEBUG, "Reading samples!");

r = pthread_create(&rx_task, NULL, rx_task_run, NULL);
Expand All @@ -452,7 +454,7 @@ int main(int argc, char **argv) {
bladerf_deinit_stream(rx_stream);
exit(EXIT_FAILURE);
}

pthread_join(rx_task, NULL);
bladerf_deinit_stream(rx_stream);

Expand Down

0 comments on commit 8a3e0b3

Please sign in to comment.