aboutsummaryrefslogtreecommitdiffstats
path: root/src/bnetz
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2016-03-05 08:02:13 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2016-03-13 09:12:14 +0100
commit9b8e3592643029412b38dbe5bfae4c73f0199a66 (patch)
tree1acdb14dd70d20b5e1a542497947bb0171f6c553 /src/bnetz
parent01a29ccfaa603d8d9ece3494220d50d7086496a7 (diff)
anetz/bnetz: Remove redundant code to enter idle state
Diffstat (limited to 'src/bnetz')
-rw-r--r--src/bnetz/bnetz.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/bnetz/bnetz.c b/src/bnetz/bnetz.c
index b87f2eb..23a6a9c 100644
--- a/src/bnetz/bnetz.c
+++ b/src/bnetz/bnetz.c
@@ -239,6 +239,7 @@ int bnetz_init(void)
}
static void bnetz_timeout(struct timer *timer);
+static void bnetz_go_idle(bnetz_t *bnetz);
/* Create transceiver instance and link to a list. */
int bnetz_create(const char *sounddev, int samplerate, int kanal, int gfs, int loopback, double loss_factor, const char *pilot)
@@ -312,16 +313,14 @@ error_pilot:
goto error;
}
- /* go into idle state */
- PDEBUG(DBNETZ, DEBUG_INFO, "Entering IDLE state, sending 'Gruppenfreisignal' %d on channel %d.\n", gfs, kanal);
- bnetz->state = BNETZ_FREI;
- bnetz->dsp_mode = DSP_MODE_TELEGRAMM;
bnetz->gfs = gfs;
strncpy(bnetz->pilot_file, pilot_file, sizeof(bnetz->pilot_file) - 1);
strncpy(bnetz->pilot_on, pilot_on, sizeof(bnetz->pilot_on) - 1);
strncpy(bnetz->pilot_off, pilot_off, sizeof(bnetz->pilot_off) - 1);
timer_init(&bnetz->timer, bnetz_timeout, bnetz);
- switch_channel_19(bnetz, 0);
+
+ /* go into idle state */
+ bnetz_go_idle(bnetz);
return 0;