|
|
|
|
@ -2974,6 +2974,7 @@ void get_tlm_fc() { // FUNcube Mode telemetry generation
|
|
|
|
|
void socket_send(int length) {
|
|
|
|
|
|
|
|
|
|
printf("Socket_send!\n");
|
|
|
|
|
fflush(stdout);
|
|
|
|
|
int error = 0;
|
|
|
|
|
|
|
|
|
|
if (!socket_open && transmit) { // open socket if not open
|
|
|
|
|
@ -3003,6 +3004,7 @@ void socket_send(int length) {
|
|
|
|
|
if (connect(sock, (struct sockaddr * ) & serv_addr, sizeof(serv_addr)) < 0) {
|
|
|
|
|
printf("\nConnection Failed \n");
|
|
|
|
|
printf("Error: %s\n", strerror(errno));
|
|
|
|
|
fflush(stdout);
|
|
|
|
|
error = 1;
|
|
|
|
|
sleep(1);
|
|
|
|
|
|
|
|
|
|
@ -3027,6 +3029,7 @@ void socket_send(int length) {
|
|
|
|
|
if (connect(sock, (struct sockaddr * ) & serv_addr, sizeof(serv_addr)) < 0) {
|
|
|
|
|
printf("\nConnection Failed \n");
|
|
|
|
|
printf("Error: %s\n", strerror(errno));
|
|
|
|
|
fflush(stdout);
|
|
|
|
|
error = 1;
|
|
|
|
|
sleep(1);
|
|
|
|
|
}
|
|
|
|
|
@ -3036,6 +3039,7 @@ void socket_send(int length) {
|
|
|
|
|
// ; //transmitStatus = -1;
|
|
|
|
|
if (error_count++ > 5) {
|
|
|
|
|
printf("Restarting transmit\n");
|
|
|
|
|
fflush(stdout);
|
|
|
|
|
FILE * transmit_restartf = popen("sudo systemctl restart transmit", "r");
|
|
|
|
|
pclose(transmit_restartf);
|
|
|
|
|
sleep(10); // was 5 // sleep if socket connection refused
|
|
|
|
|
|