diff --git a/QnetGateway.cpp b/QnetGateway.cpp index b985bef..bd9e2cb 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -823,7 +823,7 @@ void CQnetGateway::ProcessTimeouts() // the to_print is an integer that counts down how many 2-voice-frame pairs remain to be processed. // ABC_grp means that we are processing a 20-character message. // C_seen means that we are processing the last 2-voice-frame packet on a 20 character message. -void CQnetGateway::ProcessSlowData(unsigned char *data, unsigned short sid, unsigned char &header_type, bool *new_group, short *to_print, bool *ABC_grp, bool *C_seen) +void CQnetGateway::ProcessSlowData(unsigned char *data, unsigned short sid) { /* extract 20-byte RADIO ID */ if ((data[0] != 0x55) || (data[1] != 0x2d) || (data[2] != 0x16)) { @@ -1134,13 +1134,6 @@ void CQnetGateway::Process() int dtmf_last_frame[3] = { 0, 0, 0 }; unsigned int dtmf_counter[3] = { 0, 0, 0 }; - // text stuff - bool new_group[3] = { true, true, true }; - unsigned char header_type = 0; - short to_print[3] = { 0, 0, 0 }; - bool ABC_grp[3] = { false, false, false }; - bool C_seen[3] = { false, false, false }; - dstar_dv_init(); int max_nfds = 0; @@ -1997,17 +1990,17 @@ void CQnetGateway::Process() } vPacketCount++; if (recvlen == 29) // process the slow data from every voice packet - ProcessSlowData(rptrbuf.vpkt.vasd.text, rptrbuf.vpkt.streamid, header_type, new_group, to_print, ABC_grp, C_seen); + ProcessSlowData(rptrbuf.vpkt.vasd.text, rptrbuf.vpkt.streamid); else - ProcessSlowData(rptrbuf.vpkt.vasd1.text, rptrbuf.vpkt.streamid, header_type, new_group, to_print, ABC_grp, C_seen); + ProcessSlowData(rptrbuf.vpkt.vasd1.text, rptrbuf.vpkt.streamid); /* send data to qnlink */ sendto(srv_sock, rptrbuf.pkt_id, recvlen, 0, (struct sockaddr *)&plug, sizeof(struct sockaddr_in)); /* aprs processing */ if (bool_send_aprs) - // streamID seq audio+text size - aprs->ProcessText(ntohs(rptrbuf.vpkt.streamid), rptrbuf.vpkt.ctrl, rptrbuf.vpkt.vasd.voice, (recvlen == 29)?12:15); + // streamID seq audio+text + aprs->ProcessText(ntohs(rptrbuf.vpkt.streamid), rptrbuf.vpkt.ctrl, rptrbuf.vpkt.vasd.voice); for (int i=0; i<3; i++) { /* find out if data must go to the remote G2 */ diff --git a/QnetGateway.h b/QnetGateway.h index fbf1f6c..a6a6bb1 100644 --- a/QnetGateway.h +++ b/QnetGateway.h @@ -83,13 +83,19 @@ public: int Init(char *cfgfile); private: - bool is_icom, is_not_icom; + // text stuff + bool new_group[3] = { true, true, true }; + unsigned char header_type = 0; + short to_print[3] = { 0, 0, 0 }; + bool ABC_grp[3] = { false, false, false }; + bool C_seen[3] = { false, false, false }; SPORTIP g2_internal, g2_external, g2_link, ircddb; std::string OWNER, owner, local_irc_ip, status_file, dtmf_dir, dtmf_file, echotest_dir, irc_pass, qnvoicefile; bool bool_send_qrgs, bool_irc_debug, bool_dtmf_debug, bool_regen_header, bool_qso_details, bool_send_aprs, playNotInCache; + bool is_icom, is_not_icom; int play_wait, play_delay, echotest_rec_timeout, voicemail_rec_timeout, from_remote_g2_timeout, from_local_rptr_timeout, dtmf_digit; @@ -154,7 +160,7 @@ private: void compute_aprs_hash(); void APRSBeaconThread(); void ProcessTimeouts(); - void ProcessSlowData(unsigned char *data, unsigned short sid, unsigned char &header_type, bool *new_group, short *to_print, bool *ABC_grp, bool *C_seen); + void ProcessSlowData(unsigned char *data, unsigned short sid); bool Flag_is_ok(unsigned char flag); // read configuration file diff --git a/aprs.cpp b/aprs.cpp index 263e284..7b809c9 100644 --- a/aprs.cpp +++ b/aprs.cpp @@ -52,7 +52,7 @@ void CAPRS::SelectBand(short int rptr_idx, unsigned short streamID) // Parameter len is either 12 or 15, because we took passed over the first 17 bytes // in the repeater data // Paramter seq is the byte at pos# 16(counting from zero) in the repeater data -void CAPRS::ProcessText(unsigned short streamID, unsigned char seq, unsigned char *buf, unsigned int len) +void CAPRS::ProcessText(unsigned short streamID, unsigned char seq, unsigned char *buf) { unsigned char aprs_data[200]; char aprs_buf[1024]; @@ -60,8 +60,6 @@ void CAPRS::ProcessText(unsigned short streamID, unsigned char seq, unsigned cha short int rptr_idx = -1; - len = len; - for (short int i = 0; i < 3; i++) { if (streamID == aprs_streamID[i].streamID) { rptr_idx = i; diff --git a/aprs.h b/aprs.h index ac97c2d..6d304de 100644 --- a/aprs.h +++ b/aprs.h @@ -58,7 +58,7 @@ public: ~CAPRS(); SRPTR *m_rptr; void SelectBand(short int rptr_idx, unsigned short streamID); - void ProcessText(unsigned short streamID, unsigned char seq, unsigned char *buf, unsigned int len); + void ProcessText(unsigned short streamID, unsigned char seq, unsigned char *buf); ssize_t WriteSock(char *buffer, size_t n); void Open(const std::string OWNER); void Init(); diff --git a/versions.h b/versions.h index 016bbcd..06d324a 100644 --- a/versions.h +++ b/versions.h @@ -1,5 +1,5 @@ // version strings must be 55 characters or less! -#define IRCDDB_VERSION "QnetGateway-7.4.3" +#define IRCDDB_VERSION "QnetGateway-7.4.4" #define LINK_VERSION "QnetLink-6.2.0" #define DVAP_VERSION "QnetDVAP-5.1.2" #define RELAY_VERSION "QnetRelay-0.2.3"