Merge with upstream

pull/2/head
Stelios Bounanos 2008-09-28 16:32:02 +01:00
commit 322af76d6b
7 zmienionych plików z 94 dodań i 22 usunięć

Wyświetl plik

@ -6,6 +6,21 @@ Change Log:
added log.set_call <CALL>
2) Change to macro timer implementation - bug fix for Windows
3) Fixed bug in WFaveraging - save configuration
4) Fixed ARQ tcpip bugs when used with pskmail
5) Added end of transmit feedback to ARQ client when transmit is stopped
from within fldigi (T/R button pressed).
6) XML-RPC fixes & simplification of XML-RPC error handling.
7) Added simple XML-RPC access control with three new switches
--xmlrpc-allow REGEX only allow matching methods
--xmlrpc-deny REGEX ignore matching methods
--xmlrpc-list list methods
For example: fldigi --xmlrpc-deny 'main.tx|main.run_macro' or the
shorter 'main.(tx|run_macro)' will unregister those two methods.
Add --xmlrpc-list after an allow or deny switch to verify the results.
8) Added thread signal handling with SIGUSR2 to stop the xmlrpc and
arq-socket threads and avoid the socket accept/timeout loop.
9) Removed fl_thread wrappers to direct pthread calls
10) Added various Qrunner updates
3.03
1) Changes to socket server to correct shutdown process

Wyświetl plik

@ -9,7 +9,7 @@ dnl major and minor must be integers; patch may
dnl contain other characters or be empty
m4_define(FLDIGI_MAJOR, [3])
m4_define(FLDIGI_MINOR, [0])
m4_define(FLDIGI_PATCH, [4AB])
m4_define(FLDIGI_PATCH, [4AC])
AC_INIT([fldigi], FLDIGI_MAJOR.FLDIGI_MINOR[FLDIGI_PATCH], [w1hkj AT w1hkj DOT com])

Wyświetl plik

@ -5,6 +5,7 @@ class Socket;
extern void WriteARQsocket(unsigned int data);
extern bool Socket_arqRx();
extern void AbortARQ();
class ARQ_SOCKET_Server
{

Wyświetl plik

@ -771,7 +771,11 @@ void setup_signal_handlers(void)
action.sa_handler = SIG_DFL;
// no child stopped notifications, no zombies
#ifdef __CYGWIN__
action.sa_flags = SA_NOCLDSTOP;
#else
action.sa_flags = SA_NOCLDSTOP | SA_NOCLDWAIT;
#endif
sigaction(SIGCHLD, &action, NULL);
action.sa_flags = 0;

Wyświetl plik

@ -47,6 +47,7 @@
#include "threads.h"
#include "socket.h"
#include "debug.h"
#include "qrunner.h"
#include <FL/Fl.H>
#include <FL/fl_ask.H>
@ -77,11 +78,12 @@ void ParseMode(string src)
return;
}
for (size_t i = 0; i < NUM_MODES; ++i) {
if (strlen(mode_info[i].pskmail_name) > 0)
if (strlen(mode_info[i].pskmail_name) > 0) {
if (src == mode_info[i].pskmail_name) {
init_modem(mode_info[i].mode);
REQ_SYNC(init_modem_sync, mode_info[i].mode);
break;
}
}
}
}
@ -128,7 +130,7 @@ void parse_arqtext()
}
}
}
arqtext.erase(idxCmd, idxCmdEnd - idxCmd + 8);
arqtext.erase(idxCmd, idxCmdEnd - idxCmd + 6);
if (arqtext.length() == 1 && arqtext[0] == '\n')
arqtext = "";
}
@ -266,6 +268,7 @@ bool TLF_arqRx()
#define MPSK_ISCMD 30
#define MPSK_CMDEND 31
extern void arq_run(Socket s);
extern void arq_stop();
@ -275,7 +278,8 @@ string cmdstring;
string response;
bool isTxChar = false;
bool isCmdChar = false;
bool processCmd = false;
bool isPskMail = false;
static pthread_t* arq_socket_thread = 0;
ARQ_SOCKET_Server* ARQ_SOCKET_Server::inst = 0;
@ -367,7 +371,10 @@ void* ARQ_SOCKET_Server::thread_func(void*)
void arq_run(Socket s)
{
struct timeval t = { 0, 20000 };
arqclient = s;
arqclient.set_timeout(t);
arqclient.set_nonblocking();
isSocketConnected = true;
arqmode = true;
}
@ -414,17 +421,6 @@ bool Socket_arqRx()
for (size_t i = 0; i < n; i++) {
cs = instr[i];
if (isTxChar) {
txstring += cs;
isTxChar = false;
continue;
}
if (isCmdChar) {
if (cs == MPSK_END)
isCmdChar = false;
cmdstring += cs;
continue;
}
if (cs == MPSK_BYTE) {
isTxChar = true;
continue;
@ -433,8 +429,35 @@ bool Socket_arqRx()
isCmdChar = true;
continue;
}
if (isCmdChar) {
if (cs == MPSK_END)
isCmdChar = false;
else
cmdstring += cs;
continue;
}
if (isPskMail) {
txstring += cs;
continue;
}
if (isTxChar) {
txstring += cs;
isTxChar = false;
continue;
}
}
if (cmdstring.find("PSKMAIL-ON") != string::npos) {
isPskMail = true;
txstring.clear();
//LOG_INFO (cmdstring.c_str());
}
if (cmdstring.find("PSKMAIL-OFF") != string::npos) {
isPskMail = false;
txstring.clear();
//LOG_INFO (cmdstring.c_str());
}
if (progdefaults.rsid == true) {
send0x06();
arqtext.clear();
@ -443,15 +466,21 @@ bool Socket_arqRx()
return true;
}
if (arqtext.empty()) {
if (arqtext.empty() && !txstring.empty()) {
arqtext = txstring;
pText = arqtext.begin();
arq_text_available = true;
active_modem->set_stopflag(false);
start_tx();
} else {
parse_arqtext();
if (!arqtext.empty()) {
if (mailserver && progdefaults.PSKmailSweetSpot)
active_modem->set_freq(progdefaults.PSKsweetspot);
pText = arqtext.begin();
arq_text_available = true;
active_modem->set_stopflag(false);
start_tx();
}
} else if (!txstring.empty()) {
arqtext.append(txstring);
}
txstring.clear();
cmdstring.clear();
return true;
@ -485,6 +514,19 @@ void WriteARQ( unsigned int data)
#endif
}
// following function used if the T/R button is pressed to stop a transmission
// that is servicing the ARQ text buffer. It allows the ARQ client to reset
// itself properly
void AbortARQ() {
if (arq_text_available) {
arqtext.clear();
pText = arqtext.begin();
arq_text_available = false;
WriteARQ(0x06);
}
}
//-----------------------------------------------------------------------------
// Write End of Transmit character to ARQ client
//-----------------------------------------------------------------------------

Wyświetl plik

@ -196,6 +196,12 @@ int cFreqControl::handle(int event)
case FL_Up:
d = 10;
break;
case FL_Page_Up:
d = 100;
break;
case FL_Page_Down:
d = -100;
break;
default:
return 1;
}
@ -220,3 +226,4 @@ int cFreqControl::handle(int event)
return 1;
}

Wyświetl plik

@ -47,6 +47,7 @@
#include "configuration.h"
#include "Viewer.h"
#include "macros.h"
#include "arq_io.h"
extern modem *active_modem;
@ -970,6 +971,8 @@ void xmtrcv_cb(Fl_Widget *w, void *vi)
else {
active_modem->set_stopflag(true);
TransmitText->clear();
if (arq_text_available)
AbortARQ();
if (progdefaults.useTimer)
progdefaults.useTimer = false;
}