Working, added socket_open variable to check if socket already open

pull/26/head
alanbjohnston 7 years ago committed by GitHub
parent 3fea286394
commit b6dfe6fe39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -75,6 +75,7 @@ void config_x25();
void trans_x25();
int upper_digit(int number);
int lower_digit(int number);
int socket_open = 0;
#define S_RATE (48000) // (44100)
#define BUF_SIZE (S_RATE*10) /* 2 second buffer */
@ -766,6 +767,8 @@ int get_tlm_fox() {
// socket write
if (!socket_open)
{
struct sockaddr_in address;
int sock = 0, valread;
struct sockaddr_in serv_addr;
@ -794,6 +797,9 @@ int get_tlm_fox() {
printf("\nConnection Failed \n");
error = 1;
}
if (errror != 1)
socket_open = 1;
}
if (!error)
{

Loading…
Cancel
Save

Powered by TurnKey Linux.