diff --git a/DSP_API/SmartSDR_Interface/discovery_client.c b/DSP_API/SmartSDR_Interface/discovery_client.c index 04941ae..073eade 100644 --- a/DSP_API/SmartSDR_Interface/discovery_client.c +++ b/DSP_API/SmartSDR_Interface/discovery_client.c @@ -83,9 +83,6 @@ static void _dc_RadioFound(Radio radio) // start a keepalive to keep the channel open and know when it dies tc_Init(radio->ip, radio->port); - uint32 result = register_mode(); - // quick and dirty fail for now - if (result != SUCCESS) exit(1); tc_startKeepalive(); usleep(250000); hal_Listener_Init(); diff --git a/DSP_API/SmartSDR_Interface/traffic_cop.c b/DSP_API/SmartSDR_Interface/traffic_cop.c index 0fcb385..59885e5 100644 --- a/DSP_API/SmartSDR_Interface/traffic_cop.c +++ b/DSP_API/SmartSDR_Interface/traffic_cop.c @@ -353,6 +353,9 @@ static void* _tc_thread(void* arg) // if this fails, the program just exits _tc_openSocket(); + result = register_mode(); + if (result != SUCCESS) exit(1); + // loop receiving data from SmartSDR and sending it where it should go while (!_abort) {