Remove more async code to clean up compiler warning for 4.5

pull/910/head
Mike Black W9MDB 2021-12-27 17:09:50 -06:00
rodzic af3027bbd1
commit 045ab048f1
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -214,10 +214,12 @@ typedef struct async_data_handler_priv_data_s
async_data_handler_args args;
} async_data_handler_priv_data;
#ifdef ASYNC_BUG
static int async_data_handler_start(RIG *rig);
static int async_data_handler_stop(RIG *rig);
void *async_data_handler(void *arg);
#endif
#endif
/*
* track which rig is opened (with rig_open)
@ -1021,7 +1023,9 @@ int HAMLIB_API rig_open(RIG *rig)
}
#if !defined(WIN32)
#ifdef ASYNC_BUG
status = async_data_handler_start(rig);
#endif
#endif
if (status < 0)
@ -1044,7 +1048,9 @@ int HAMLIB_API rig_open(RIG *rig)
if (status != RIG_OK)
{
#ifdef ASYNC_BUG
async_data_handler_stop(rig);
#endif
port_close(&rs->rigport, rs->rigport.type.rig);
RETURNFUNC(status);
}
@ -1156,7 +1162,9 @@ int HAMLIB_API rig_close(RIG *rig)
caps->rig_close(rig);
}
#ifdef ASYNC_BUG
async_data_handler_stop(rig);
#endif
/*
* FIXME: what happens if PTT and rig ports are the same?
@ -6834,6 +6842,7 @@ HAMLIB_EXPORT(void) sync_callback(int lock)
#define MAX_FRAME_LENGTH 1024
#ifdef ASYNC_BUG
static int async_data_handler_start(RIG *rig)
{
const struct rig_caps *caps = rig->caps;
@ -6903,6 +6912,7 @@ static int async_data_handler_stop(RIG *rig)
RETURNFUNC(RIG_OK);
}
#endif
void *async_data_handler(void *arg)
{