Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package flamp for openSUSE:Factory checked 
in at 2025-05-12 16:47:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/flamp (Old)
 and      /work/SRC/openSUSE:Factory/.flamp.new.30101 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "flamp"

Mon May 12 16:47:50 2025 rev:2 rq:1276436 version:2.2.14

Changes:
--------
--- /work/SRC/openSUSE:Factory/flamp/flamp.changes      2025-04-20 
19:52:27.194084144 +0200
+++ /work/SRC/openSUSE:Factory/.flamp.new.30101/flamp.changes   2025-05-12 
16:51:21.926935424 +0200
@@ -1,0 +2,6 @@
+Fri May  9 18:08:15 UTC 2025 - Andreas Stieger <andreas.stie...@gmx.de>
+
+- update to version 2.2.14:
+  * Fixes to relay repeat/file handling
+
+-------------------------------------------------------------------

Old:
----
  flamp-2.2.13.tar.gz

New:
----
  flamp-2.2.14.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ flamp.spec ++++++
--- /var/tmp/diff_new_pack.niILju/_old  2025-05-12 16:51:22.658966255 +0200
+++ /var/tmp/diff_new_pack.niILju/_new  2025-05-12 16:51:22.662966424 +0200
@@ -18,7 +18,7 @@
 
 
 Name:           flamp
-Version:        2.2.13
+Version:        2.2.14
 Release:        0
 Summary:        Amateur Multicast Protocol - file transfer program
 License:        GPL-2.0

++++++ flamp-2.2.13.tar.gz -> flamp-2.2.14.tar.gz ++++++
++++ 1703 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flamp-2.2.13/ChangeLog new/flamp-2.2.14/ChangeLog
--- old/flamp-2.2.13/ChangeLog  2024-07-08 22:05:56.000000000 +0200
+++ new/flamp-2.2.14/ChangeLog  2024-09-16 13:16:16.000000000 +0200
@@ -1,11 +1,11 @@
-2024-07-08  dave-w1hkj  <w1...@bellsouth.net>
+2024-09-16  dave-w1hkj  <w1...@bellsouth.net>
 
-       9f813ca: Version 2.2.13
+       355ffbe: Version 2.1.14
+       50f2045: Version 2.2.13
 
-2024-05-25  kk5vd  <kk...@yahoo.com>
+2024-05-30  kk5vd  <kk...@yahoo.com>
 
-       7ca71a5: Excess Guardlock Removed
-       1b8af59: RELAY/OUTPUT FORMAT/GUARD LOCK
+       54dd26f: RELAY REPEAT/FILE HANDLING
 
 2024-04-14  dave-w1hkj  <w1...@bellsouth.net>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flamp-2.2.13/configure.ac new/flamp-2.2.14/configure.ac
--- old/flamp-2.2.13/configure.ac       2024-07-08 22:06:13.000000000 +0200
+++ new/flamp-2.2.14/configure.ac       2024-09-16 13:16:16.000000000 +0200
@@ -11,7 +11,7 @@
 dnl contain other characters or be empty
 m4_define(FLAMP_MAJOR,  [2])
 m4_define(FLAMP_MINOR,  [2])
-m4_define(FLAMP_PATCH,  [.13])
+m4_define(FLAMP_PATCH,  [.14])
 
 AC_INIT([FLAMP], FLAMP_MAJOR.FLAMP_MINOR[]FLAMP_PATCH, [w1hkj AT w1hkj DOT 
com])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flamp-2.2.13/src/config.h new/flamp-2.2.14/src/config.h
--- old/flamp-2.2.13/src/config.h       2024-07-08 22:28:49.000000000 +0200
+++ new/flamp-2.2.14/src/config.h       2024-09-16 13:17:51.000000000 +0200
@@ -11,7 +11,7 @@
 #define BUILD_CONFIGURE_ARGS ""
 
 /* Build date */
-#define BUILD_DATE "Mon Jul  8 15:28:49 CDT 2024"
+#define BUILD_DATE "Mon Sep 16 06:17:51 CDT 2024"
 
 /* Build host */
 #define BUILD_HOST "tk7"
@@ -41,7 +41,7 @@
 #define FLAMP_FLTK_API_PATCH 9
 
 /* version string */
-#define FLAMP_VERSION "2.2.13"
+#define FLAMP_VERSION "2.2.14"
 
 /* major version number */
 #define FLAMP_VERSION_MAJOR 2
@@ -50,7 +50,7 @@
 #define FLAMP_VERSION_MINOR 2
 
 /* patch/alpha version string */
-#define FLAMP_VERSION_PATCH ".13"
+#define FLAMP_VERSION_PATCH ".14"
 
 /* FLTK version */
 #define FLTK_BUILD_VERSION "1.3.9"
@@ -200,7 +200,7 @@
 #define PACKAGE_NAME "FLAMP"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "FLAMP 2.2.13"
+#define PACKAGE_STRING "FLAMP 2.2.14"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "flamp"
@@ -209,7 +209,7 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "2.2.13"
+#define PACKAGE_VERSION "2.2.14"
 
 /* Define to 1 if all of the C90 standard headers exist (not just the ones
    required in a freestanding environment). This macro is provided for
@@ -311,7 +311,7 @@
 #define USE_X 1
 
 /* Version number of package */
-#define VERSION "2.2.13"
+#define VERSION "2.2.14"
 
 /* x version */
 #define X_BUILD_VERSION "1.7.5"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flamp-2.2.13/src/flamp.cxx new/flamp-2.2.14/src/flamp.cxx
--- old/flamp-2.2.13/src/flamp.cxx      2024-07-08 22:03:49.000000000 +0200
+++ new/flamp-2.2.14/src/flamp.cxx      2024-07-09 21:50:38.000000000 +0200
@@ -731,6 +731,7 @@
        fseek(dfile, 0, SEEK_END);
        size_t fsize = ftell(dfile);
        if (fsize <= 0) {
+               fclose(dfile);
                LOG_INFO("%s", "fsize error");
                return;
        }
@@ -738,6 +739,7 @@
        tx_buffer.resize(fsize);
        size_t r = fread((void *)tx_buffer.c_str(), 1, fsize, dfile);
        if (r != fsize) {
+           fclose(dfile);
                LOG_INFO("%s", "read error");
                return;
        }
@@ -858,6 +860,7 @@
        size_t fsize = ftell(dfile);
        if (fsize <= 0) {
                LOG_INFO("%s", "fsize error");
+               fclose(dfile);
                return;
        }
        fseek(dfile, 0, SEEK_SET);
@@ -865,6 +868,7 @@
        size_t r = fread((void *)tx_buffer.c_str(), 1, fsize, dfile);
        if (r != fsize) {
                LOG_INFO("%s", "read error");
+               fclose(dfile);
                return;
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flamp-2.2.13/src/include/amp.h new/flamp-2.2.14/src/include/amp.h
--- old/flamp-2.2.13/src/include/amp.h  2024-07-08 22:03:49.000000000 +0200
+++ new/flamp-2.2.14/src/include/amp.h  2024-07-09 21:48:09.000000000 +0200
@@ -57,18 +57,6 @@
 extern const char *sz_flamp;
 extern void preamble_detected(void);
 
-
-//! @class amp_lock
-//! Used to lock a process and to ensure release upon exit
-class amp_lock
-{
-public:
-       amp_lock(pthread_mutex_t * m);
-       ~amp_lock(void);
-private:
-       pthread_mutex_t * mutex;
-};
-
 //! @struct relay_data
 //! Used to tranfer information via TX_FLDIGI_THREAD->data pointer
 //! to process relay_data with interval timer.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flamp-2.2.13/src/include/global_amp.h 
new/flamp-2.2.14/src/include/global_amp.h
--- old/flamp-2.2.13/src/include/global_amp.h   2024-07-08 22:03:49.000000000 
+0200
+++ new/flamp-2.2.14/src/include/global_amp.h   2024-07-09 21:48:09.000000000 
+0200
@@ -24,7 +24,6 @@
 #ifndef __flamp_global_amp__
 #define __flamp_global_amp__
 
-
 //! Use to sync class cAmp global variables via a threaded mutex lock access.
 class cAmpGlobal {
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flamp-2.2.13/src/utils/amp.cxx new/flamp-2.2.14/src/utils/amp.cxx
--- old/flamp-2.2.13/src/utils/amp.cxx  2024-07-08 22:03:49.000000000 +0200
+++ new/flamp-2.2.14/src/utils/amp.cxx  2024-07-09 21:50:38.000000000 +0200
@@ -37,24 +37,6 @@
        "<FILE ", "<ID ", "<DTTM ", "<SIZE ", "<DESC ", "<DATA ", "<PROG ", 
"<CNTL "
 };
 
-
-/** ********************************************************
- *
- ***********************************************************/
-amp_lock::amp_lock(pthread_mutex_t * m) : mutex(m)
-{
-       pthread_mutex_lock(mutex);
-}
-
-
-/** ********************************************************
- *
- ***********************************************************/
-amp_lock::amp_lock::~amp_lock(void)
-{
-       pthread_mutex_unlock(mutex);
-}
-
 /** ********************************************************
  *
  ***********************************************************/
@@ -65,14 +47,15 @@
        thread_locks = 0;
        pthread_mutex_init(&mutex_amp_io, NULL);
 
-       amp_lock io_lock(&mutex_amp_io);
        src_amp->lock();
+       lock();
 
        int index = 0;
        int count = 0;
 
        cAmp_type = src_amp->cAmp_type;
 
+       // transmit
        modem.assign(src_amp->modem);
        report_buffer.assign(src_amp->report_buffer);
        tosend.assign(src_amp->tosend);
@@ -151,6 +134,7 @@
        rxblocks     = src_amp->rxblocks;
        rxDataHeader = src_amp->rxDataHeader;
 
+       unlock();
        src_amp->unlock();
 
        if(cAmp_type == TX_AMP)
@@ -164,7 +148,7 @@
 {
        pthread_mutex_init(&mutex_amp_io, NULL);
 
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
 
        modem.clear();
        report_buffer.clear();
@@ -209,6 +193,7 @@
        cAmp_type = 0;
        thread_locks = 0;
 
+       unlock();
 }
 
 /** ********************************************************
@@ -224,8 +209,6 @@
  ***********************************************************/
 void cAmp::clear_rx()
 {
-       // amp_lock io_lock(&mutex_amp_io);
-
        _rx_raw_cntl.clear();
        _rx_raw_desc.clear();
        _rx_raw_id.clear();
@@ -252,9 +235,10 @@
  ***********************************************************/
 std::string cAmp::file_hash()
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string data;
        data.assign(_file_hash());
+       unlock();
        return data;
 }
 
@@ -487,10 +471,11 @@
        fstring.clear(); // file std::strings
        call_from_to.clear();
 
-       if(xmtcallto.empty())
+       if(xmtcallto.empty()) {
                xmtcallto.assign("QST");
+       }       
 
-       call_from_to.assign("\n\n").append(xmtcallto).append(" DE 
").append(xmtcall).append("\n\n");
+       call_from_to.assign(xmtcallto).append(" DE 
").append(xmtcall).append("\n\n");
 
        xmtstring.assign(call_from_to);
        xmtstring.append(program_header());
@@ -542,7 +527,7 @@
        fstring.append(data_eof());
 
        for (int i = 0; i < xmt_repeat; i++)
-       xmtstring.append(fstring);
+               xmtstring.append(fstring);
 
        xmtstring.append(data_eot());
 
@@ -643,9 +628,10 @@
  ***********************************************************/
 void cAmp::unproto_markers(bool unproto_markers)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        _unproto_markers = unproto_markers;
        _xmt_unproto(true);
+       unlock();
 }
 
 /** ********************************************************
@@ -669,7 +655,7 @@
        if(xmtcallto.empty())
                xmtcallto.assign("QST");
 
-       call_from_to.assign("\n\n").append(xmtcallto).append(" DE 
").append(xmtcall).append("\n\n");
+       call_from_to.assign(xmtcallto).append(" DE 
").append(xmtcall).append("\n\n");
 
        pos = 0;
        do {
@@ -720,7 +706,7 @@
  ***********************************************************/
 int cAmp::xmt_vector_string(bool header_modem, bool unproto_markers, bool 
data_repeat_inhibit)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
 
        std::string call_from_to = "";
        std::string up_string;
@@ -736,7 +722,7 @@
        if(xmtcallto.empty())
                xmtcallto.assign("QST");
 
-       call_from_to.assign("\n\n").append(xmtcallto).append(" DE 
").append(xmtcall).append("\n\n");
+       call_from_to.assign(xmtcallto).append(" DE 
").append(xmtcall).append("\n\n");
 
        header_string_array.clear();
        data_string_array.clear();
@@ -884,6 +870,8 @@
                }
        }
 
+       unlock();
+
        return (header_string_array.size() + data_string_array.size());
 }
 
@@ -892,9 +880,10 @@
  ***********************************************************/
 void cAmp::time_stamp(time_t *tp)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        if(tp)
                _time_stamp(tp);
+       unlock();
 }
 
 /** ********************************************************
@@ -962,7 +951,7 @@
 std::string cAmp::rx_recvd_string()
 {
 
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
 
        std::string retstr = "";
        if (!rx_completed()) return retstr;
@@ -970,6 +959,7 @@
        for (iter = rxblocks.begin(); iter != rxblocks.end(); iter++) {
                retstr.append(iter->second);
        }
+       unlock();
 
        return retstr;
 }
@@ -1116,7 +1106,7 @@
 {
        if (rxbuffer.length() < 16) return;
 
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
 
        size_t p = 0, p1 = 0;
        int len;
@@ -1129,6 +1119,7 @@
                                if (len > 2048 + 6) { // exceeds maximum 
allowable length
                                        rxbuffer.erase(0,1);
                                        LOG_INFO("corrupt length %d", len);
+                                       unlock();
                                        return;
                                }
                                p1 = rxbuffer.find(">", strlen(ltypes[n]));
@@ -1136,20 +1127,24 @@
                                        LOG_INFO("incomplete header %s", 
rxbuffer.substr(0,15).c_str());
                                        if (rxbuffer.length() > 15)
                                                rxbuffer.erase(0,1);
+                                       unlock();
                                        return;
                                }
                                if (rxbuffer.length() >= p1 + 1 + len) {
                                        if (rx_parse_line(n, crc, 
rxbuffer.substr(p1 + 1, len))) {
                                                rxbuffer.erase(0, p1 + 1 + len);
+                                               unlock();
                                                return;
                                        } else {
                                                rxbuffer.erase(0,1);
+                                               unlock();
                                                return;
                                        }
                                }
                        }
                }
        }
+       unlock();
 }
 
 /** ********************************************************
@@ -1185,7 +1180,7 @@
  ***********************************************************/
 std::string cAmp::rx_missing()
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
 
        std::string missing;
        char number[20];
@@ -1198,6 +1193,8 @@
                }
        }
 
+       unlock();
+
        return missing;
 }
 
@@ -1206,7 +1203,7 @@
  ***********************************************************/
 std::string cAmp::rx_report()
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
 
        std::string temp;
        char number[20];
@@ -1229,6 +1226,8 @@
        report.append(sz_len(temp)).append(" ").append(chksum.scrc16(temp));
        report.append(">").append(temp).append(nuline);
 
+       unlock();
+
        return report;
 }
 
@@ -1237,8 +1236,9 @@
  ***********************************************************/
 void cAmp::append_report(std::string s)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        report_buffer.append(s);
+       unlock();
 }
 
 /** ********************************************************
@@ -1254,7 +1254,7 @@
        //       n1...nN are missing block numbers
        // append each valid occurance to the tosend std::string
 
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
 
        static const char *sz_missing = "<MISSING ";
        static const char *sz_preamble = "PREAMBLE";
@@ -1305,6 +1305,7 @@
        }
 
        tosend = reformat_missing_blocks(blocks);
+       unlock();
 }
 
 /** ********************************************************
@@ -1322,7 +1323,7 @@
                if (sscanf(missing_blocks.c_str(), "%d", &iblock) == 1) {
                        insert_ok = true;
                        for (pblock = iblocks.begin(); pblock != iblocks.end(); 
pblock++)
-                       if (*pblock == iblock) { insert_ok = false; break; }
+                               if (*pblock == iblock) { insert_ok = false; 
break; }
                        if (insert_ok) iblocks.push_back(iblock);
                }
                while (!missing_blocks.empty() && isdigit(missing_blocks[0]))
@@ -1353,7 +1354,7 @@
  ***********************************************************/
 std::string cAmp::tx_relay_string(std::string callfrom, std::string 
missing_blocks, bool filesave_flag)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
 
        AMPmap::iterator ihead;
        AMPmap::iterator idata;
@@ -1370,6 +1371,7 @@
        std::string temp_data;
 
        if(callfrom.empty()) {
+               unlock();
                return xmtstring;
        }
 
@@ -1384,7 +1386,7 @@
        the_data.clear();
        xmtstring.clear();
 
-       callto_from.assign("\n\nDE ").append(callfrom).append("\n");
+       callto_from.assign("\nDE ").append(callfrom).append("\n");
        callto_from.append("\nFLAMP Relay\n\n");
 
        blocks = reformat_missing_blocks(missing_blocks);
@@ -1409,8 +1411,8 @@
 
                for(repeat_index = 0; repeat_index < data_repeat; 
repeat_index++) {
                        for (idata = rxblocks.begin(), ihead = 
rxDataHeader.begin();
-                                ((idata != rxblocks.end()) || (ihead != 
rxDataHeader.end()));
-                                idata++, ihead++) {
+                               ((idata != rxblocks.end()) || (ihead != 
rxDataHeader.end()));
+                               idata++, ihead++) {
                                the_data.append(ihead->second);
                                the_data.append(idata->second).append("\n");
                        }
@@ -1431,6 +1433,7 @@
                block_flags = new char [count + 2];
 
                if(!block_flags) {
+                       unlock();
                        return xmtstring;
                }
 
@@ -1510,6 +1513,8 @@
 
        }
 
+       unlock();
+
        return xmtstring;
 }
 
@@ -1518,7 +1523,7 @@
  ***********************************************************/
 int cAmp::tx_relay_vector(std::string callfrom, std::string missing_blocks)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
 
        AMPmap::iterator idata;
        AMPmap::iterator ihead;
@@ -1531,29 +1536,26 @@
        std::string temp_data;
        std::string the_data;
        int repeat_index  = 0;
-       int header_repeat = 1;
-       int data_repeat   = 1;
-
+       int header_repeat = 0;
+       int data_repeat   = 0;
+       
        header_repeat = progStatus.repeat_relay_header;
        data_repeat   = progStatus.repeat_relay_data;
-
-       // LOG_DEBUG("header_repeat: %d data_repeat: %d", header_repeat, 
data_repeat);
-
+       
        if(callfrom.empty()) {
+               unlock();
                return 0;
        }
 
        header_string_array.clear();
        data_string_array.clear();
 
-       callto_from.assign("\n\nDE ").append(callfrom).append("\n");
+       callto_from.assign("\nDE ").append(callfrom).append("\n");
        callto_from.append("\nFLAMP Relay\n\n");
        data_string_array.push_back(callto_from);
 
        blocks = reformat_missing_blocks(missing_blocks);
 
-       // LOG_DEBUG("BLOCKS: %lu %s", blocks.size(), blocks.c_str());
-
        if(blocks.empty()) {
                for(repeat_index = 0; repeat_index < header_repeat; 
repeat_index++) {
                        if(_rx_raw_prog.size()) {
@@ -1585,7 +1587,7 @@
                for(repeat_index = 0; repeat_index < data_repeat; 
repeat_index++) {
                        for (idata = rxblocks.begin(), ihead = 
rxDataHeader.begin();
                                 ((idata != rxblocks.end()) || (ihead != 
rxDataHeader.end()));
-                                idata++, ihead++) {
+                               idata++, ihead++) {
                                
the_data.assign(ihead->second).append(idata->second).append("\n");
                                data_string_array.push_back(the_data);
                        }
@@ -1594,8 +1596,6 @@
 
                count = rxnumblocks;
 
-               // LOG_DEBUG("rxnumblocks: %d", count);
-
                if(count < 1) {
                        count = 0;
                        for (idata = rxblocks.begin(); idata != rxblocks.end(); 
idata++) {
@@ -1607,6 +1607,7 @@
                block_flags = new char [count + 2];
 
                if(!block_flags) {
+                       unlock();
                        return 0;
                }
 
@@ -1623,9 +1624,6 @@
                                blocks.erase(0,1);
                }
 
-               // LOG_DEBUG("block_flags[0]: %d", block_flags[0]);
-               // LOG_DEBUG("header_repeat: %d", header_repeat);
-
                if(block_flags[0]) {
                        for(repeat_index = 0; repeat_index < header_repeat; 
repeat_index++) {
                                if(_rx_raw_prog.size()) {
@@ -1702,6 +1700,8 @@
 
        }
 
+       unlock();
+
        return data_string_array.size();
 }
 
@@ -1710,8 +1710,8 @@
  ***********************************************************/
 std::string cAmp::tx_string(std::string t_string)
 {
-       amp_lock io_lock(&mutex_amp_io);
 
+       lock();
        std::string auto_send;
 
        if(use_unproto) {
@@ -1719,8 +1719,9 @@
        } else {
                auto_send.assign(xmtstring);
        }
-       auto_send.append("\n\n").append("DE ").append(xmtcall).append(t_string);
+       auto_send.append("\n").append("DE ").append(xmtcall).append(t_string);
        auto_send.append("\n\n\n");
+       unlock();
 
        return auto_send;
 }
@@ -1784,22 +1785,16 @@
 {
        if(!_update_required) return;
 
-       amp_lock io_lock(&mutex_amp_io);
-
+       lock();
        std::string auto_send;
 
        std::string send_to = xmtcallto;
        std::string temp;
 
        if (send_to.empty()) send_to.assign("QST");
-
-       temp.assign("\n\n").append(send_to);
-       send_to.assign(temp);
-       temp.clear();
-
        send_to.append(" DE ").append(xmtcall);
        for (size_t n = 0; n < send_to.length(); n++)
-       send_to[n] = toupper(send_to[n]);
+               send_to[n] = toupper(send_to[n]);
 
        temp.clear();
 
@@ -1818,6 +1813,7 @@
 
        _valid_tx_data = true;
        _update_required = false;
+       unlock();
 }
 
 /** ********************************************************
@@ -1825,8 +1821,9 @@
  ***********************************************************/
 void cAmp::callto(std::string n)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        xmtcallto = n;
+       unlock();
 }
 
 /** ********************************************************
@@ -1834,9 +1831,10 @@
  ***********************************************************/
 std::string cAmp::callto(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string data;
        data.assign(xmtcallto);
+       unlock();
        return data;
 }
 
@@ -1845,10 +1843,11 @@
  ***********************************************************/
 void cAmp::unproto(bool n)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        if((use_unproto == true) && (n == false))
                _update_required = true;
        use_unproto = n;
+       unlock();
 }
 
 /** ********************************************************
@@ -1856,10 +1855,10 @@
  ***********************************************************/
 bool cAmp::unproto(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        int tmp = 0;
        tmp = use_unproto;
-
+       unlock();
        return tmp;
 }
 
@@ -1868,10 +1867,11 @@
  ***********************************************************/
 void cAmp::tx_blocksize(int n)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        if(blocksize != n)
                _update_required = true;
        blocksize = n;
+       unlock();
 }
 
 /** ********************************************************
@@ -1879,10 +1879,10 @@
  ***********************************************************/
 int  cAmp::tx_blocksize(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        int tmp = 0;
        tmp = blocksize;
-
+       unlock();
        return tmp;
 }
 
@@ -1891,10 +1891,10 @@
  ***********************************************************/
 int  cAmp::tx_base_conv_index(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        int tmp = 0;
        tmp = base_conversion_index;
-
+       unlock();
        return tmp;
 }
 
@@ -1903,10 +1903,11 @@
  ***********************************************************/
 void cAmp::tx_base_conv_index(int val)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        if(base_conversion_index != val)
                _update_required = true;
        base_conversion_index = val;
+       unlock();
 }
 
 /** ********************************************************
@@ -1914,10 +1915,10 @@
  ***********************************************************/
 std::string cAmp::tx_base_conv_str(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string data;
        data.assign(xmtbase);
-
+       unlock();
        return data;
 }
 
@@ -1926,10 +1927,11 @@
  ***********************************************************/
 void cAmp::tx_base_conv_str(std::string &str)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        if(strncmp(xmtbase.c_str(), str.c_str(), str.size()) != 0)
                _update_required = true;
        xmtbase.assign(str);
+       unlock();
 }
 
 /** ********************************************************
@@ -1937,13 +1939,14 @@
  ***********************************************************/
 void cAmp::tx_base_conv_str(const char *str)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string tmp;
 
        tmp.assign(str);
        if(strncmp(xmtbase.c_str(), tmp.c_str(), tmp.size()) != 0)
                _update_required = true;
        xmtbase.assign(tmp);
+       unlock();
 }
 
 /** ********************************************************
@@ -1951,10 +1954,10 @@
  ***********************************************************/
 std::string cAmp::xmt_buffer(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string data;
        data.assign(xmtbuffer);
-
+       unlock();
        return data;
 }
 
@@ -1963,7 +1966,7 @@
  ***********************************************************/
 void cAmp::xmt_buffer(std::string &str)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
 
        std::string tmp;
 
@@ -1974,6 +1977,9 @@
                _update_required = true;
                xmtbuffer.assign(str);
        }
+
+       unlock();
+
 }
 
 /** ********************************************************
@@ -1981,10 +1987,10 @@
  ***********************************************************/
 std::string cAmp::xmt_unproto_string(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string data;
        data.assign(xmtunproto);
-
+       unlock();
        return data;
 }
 
@@ -1993,7 +1999,7 @@
  ***********************************************************/
 void cAmp::xmt_unproto_string(std::string &str)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string tmp;
 
        if(xmtunproto.size() != str.size())
@@ -2001,6 +2007,8 @@
        else if(strncmp(xmtunproto.c_str(), str.c_str(), str.size()) != 0)
                _update_required = true;
        xmtunproto.assign(str);
+       unlock();
+
 }
 
 /** ********************************************************
@@ -2008,7 +2016,7 @@
  ***********************************************************/
 void cAmp::xmt_data(std::string &str)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
 
        std::string tmp;
 
@@ -2020,6 +2028,7 @@
        fsize = xmtdata.length();
        xmt_calc_numblocks();
 
+       unlock();
 }
 
 /** ********************************************************
@@ -2027,10 +2036,10 @@
  ***********************************************************/
 std::string cAmp::xmt_data(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string ret_data;
        ret_data.assign(xmtdata);
-
+       unlock();
        return ret_data;
 }
 
@@ -2039,10 +2048,10 @@
  ***********************************************************/
 std::string cAmp::xmt_hash(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string data;
        data.assign(xmthash);
-
+       unlock();
        return data;
 }
 
@@ -2051,9 +2060,10 @@
  ***********************************************************/
 void cAmp::xmt_fname(std::string fn)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        xmtfilename.assign(fn);
        _time_stamp(&tx_statbuf.st_mtime);
+       unlock();
 }
 
 /** ********************************************************
@@ -2073,15 +2083,16 @@
  ***********************************************************/
 bool cAmp::xmt_file_modified(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        struct stat cur_stat;
        if(xmtfilename_fullpath.size() > 0) {
                stat(xmtfilename_fullpath.c_str(), &cur_stat);
                if(cur_stat.st_mtime == tx_statbuf.st_mtime) {
+                       unlock();
                        return false;
                }
        }
-
+       unlock();
        return true;
 }
 
@@ -2090,10 +2101,10 @@
  ***********************************************************/
 std::string cAmp::xmt_fname()
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string data;
        data.assign(xmtfilename);
-
+       unlock();
        return data;
 }
 
@@ -2102,10 +2113,10 @@
  ***********************************************************/
 std::string cAmp::xmt_full_path_fname()
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string data;
        data.assign(xmtfilename_fullpath);
-
+       unlock();
        return data;
 }
 
@@ -2114,11 +2125,11 @@
  ***********************************************************/
 void cAmp::xmt_full_path_fname(std::string fname)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        xmtfilename_fullpath = fname;
        stat(xmtfilename_fullpath.c_str(), &tx_statbuf);
        _time_stamp(&tx_statbuf.st_mtime);
-
+       unlock();
 }
 
 /** ********************************************************
@@ -2150,10 +2161,10 @@
  ***********************************************************/
 std::string cAmp::xmt_descrip(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string data;
        data.assign(xmtdesc);
-
+       unlock();
        return data;
 }
 
@@ -2162,9 +2173,10 @@
  ***********************************************************/
 void cAmp::xmt_tosend_clear(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        tosend.clear();
        report_buffer.clear();
+       unlock();
 }
 
 /** ********************************************************
@@ -2172,8 +2184,9 @@
  ***********************************************************/
 void cAmp::xmt_tosend(std::string str)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        tosend = str;
+       unlock();
 }
 
 /** ********************************************************
@@ -2181,10 +2194,10 @@
  ***********************************************************/
 std::string cAmp::xmt_tosend(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string data;
        data.assign(tosend);
-
+       unlock();
        return data;
 }
 
@@ -2193,14 +2206,15 @@
  ***********************************************************/
 void cAmp::xmt_modem(std::string _m)
 {
-       amp_lock io_lock(&mutex_amp_io);
-
        if(_m.empty()) return;
 
+       lock();
+
        if(modem.compare(_m) != 0) {
                _update_required = true;
                modem.assign(_m);
        }
+       unlock();
 }
 
 /** ********************************************************
@@ -2208,9 +2222,10 @@
  ***********************************************************/
 std::string cAmp::xmt_modem(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string m;
        m.assign(modem);
+       unlock();
        return m;
 }
 
@@ -2219,10 +2234,11 @@
  ***********************************************************/
 void cAmp::xmt_blocksize(int n)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        if(xmtblocksize != n)
                _update_required = true;
        xmtblocksize = n;
+       unlock();
 }
 
 /** ********************************************************
@@ -2230,10 +2246,10 @@
  ***********************************************************/
 int  cAmp::xmt_blocksize()
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        int tmp = 0;
        tmp = xmtblocksize;
-
+       unlock();
        return tmp;
 }
 
@@ -2242,11 +2258,12 @@
  ***********************************************************/
 std::string cAmp::xmt_numblocks()
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string data;
        xmt_calc_numblocks();
        int count = xmtnumblocks;
        data.assign(sz_num(count));
+       unlock();
 
        return data;
 }
@@ -2256,7 +2273,6 @@
  ***********************************************************/
 void cAmp::xmt_calc_numblocks(void)
 {
-       // amp_lock io_lock(&mutex_amp_io);
        xmtnumblocks = xmtdata.length() / xmtblocksize + (xmtdata.length() % 
xmtblocksize ? 1 : 0);
 }
 
@@ -2265,8 +2281,9 @@
  ***********************************************************/
 void cAmp::my_call(std::string call)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        xmtcall.assign(call);
+       unlock();
 }
 
 /** ********************************************************
@@ -2274,10 +2291,10 @@
  ***********************************************************/
 std::string cAmp::my_call(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string data;
        data.assign(xmtcall);
-
+       unlock();
        return data;
 }
 
@@ -2286,9 +2303,9 @@
  ***********************************************************/
 void cAmp::my_info(std::string info)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        xmtinfo.assign(info);
-
+       unlock();
 }
 
 /** ********************************************************
@@ -2296,9 +2313,10 @@
  ***********************************************************/
 std::string cAmp::my_info(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        std::string data;
        data.assign(xmtinfo);
+       unlock();
        return data;
 }
 
@@ -2307,10 +2325,11 @@
  ***********************************************************/
 void cAmp::compress(bool comp)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        if(use_compression != comp)
                _update_required = true;
        use_compression = comp;
+       unlock();
 }
 
 /** ********************************************************
@@ -2318,10 +2337,11 @@
  ***********************************************************/
 bool cAmp::compress()
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        bool tmp = false;
        tmp = use_compression;
-
+       unlock();
+       
        return tmp;
 }
 
@@ -2330,10 +2350,11 @@
  ***********************************************************/
 void cAmp::forced_compress(bool comp)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        if(use_forced_compression != comp)
                _update_required = true;
        use_forced_compression = comp;
+       unlock();
 }
 
 /** ********************************************************
@@ -2341,9 +2362,10 @@
  ***********************************************************/
 bool cAmp::forced_compress(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        bool tmp = false;
        tmp = use_forced_compression;
+       unlock();
        return tmp;
 }
 
@@ -2352,10 +2374,11 @@
  ***********************************************************/
 void cAmp::repeat(int n)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        if(xmt_repeat != n)
                _update_required = true;
        xmt_repeat = n;
+       unlock();
 }
 
 /** ********************************************************
@@ -2363,10 +2386,10 @@
  ***********************************************************/
 int  cAmp::repeat()
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        int tmp = 0;
        tmp = xmt_repeat;
-
+       unlock();
        return tmp;
 }
 
@@ -2375,10 +2398,11 @@
  ***********************************************************/
 void cAmp::header_repeat(int n)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        if(repeat_header != n)
                _update_required = true;
        repeat_header = n;
+       unlock();
 }
 
 /** ********************************************************
@@ -2386,10 +2410,10 @@
  ***********************************************************/
 int  cAmp::header_repeat(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        int tmp = 0;
        tmp = repeat_header;
-
+       unlock();
        return tmp;
 }
 
@@ -2398,10 +2422,10 @@
  ***********************************************************/
 bool  cAmp::update_required(void)
 {
-       amp_lock io_lock(&mutex_amp_io);
+       lock();
        bool tmp = 0;
        tmp = _update_required;
-
+       unlock();
        return tmp;
 }
 
@@ -2423,4 +2447,3 @@
        pthread_mutex_unlock(&mutex_amp_io);
 }
 
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flamp-2.2.13/src/utils/global_amp.cxx 
new/flamp-2.2.14/src/utils/global_amp.cxx
--- old/flamp-2.2.13/src/utils/global_amp.cxx   2024-07-08 22:03:49.000000000 
+0200
+++ new/flamp-2.2.14/src/utils/global_amp.cxx   2024-07-09 21:48:09.000000000 
+0200
@@ -56,8 +56,9 @@
  ***********************************************************/
 cAmp * cAmpGlobal::get_amp(void)
 {
-       amp_lock io_lock(&mutex_amp);
+       lock();
        cAmp *ret = amp;
+       unlock();
        return ret;
 }
 
@@ -66,7 +67,7 @@
  ***********************************************************/
 int cAmpGlobal::get_index(void)
 {
-       amp_lock io_lock(&mutex_amp);
+       lock();
        int index = 0;
        int count = amp_array.size();
        int ret = 0;
@@ -74,7 +75,7 @@
                if(amp == amp_array[index])
                        ret = index + 1;
        }
-
+       unlock();
        return ret;
 }
 
@@ -83,7 +84,7 @@
  ***********************************************************/
 bool cAmpGlobal::set(int pos)
 {
-       amp_lock io_lock(&mutex_amp);
+       lock();
        int count = amp_array.size();
        int ret   = false;
        if((pos > count) || (pos < 1))
@@ -92,6 +93,7 @@
                amp = amp_array[pos - 1];
        if(amp)
                ret = true;
+       unlock();
 
        return ret;
 }
@@ -101,11 +103,12 @@
  ***********************************************************/
 bool cAmpGlobal::set(cAmp *src_amp)
 {
-       amp_lock io_lock(&mutex_amp);
+       lock();
        bool ret = false;
        amp = src_amp;
        if(amp)
                ret = true;
+       unlock();
 
        return ret;
 }
@@ -115,7 +118,7 @@
  ***********************************************************/
 int cAmpGlobal::amp2index(cAmp *src_amp)
 {
-       amp_lock io_lock(&mutex_amp);
+       lock();
        int index = 0;
        int count = amp_array.size();
        int ret = 0;
@@ -123,6 +126,7 @@
                if(src_amp == amp_array[index])
                        ret = index + 1;
        }
+       unlock();
 
        return ret;
 }
@@ -132,14 +136,14 @@
  ***********************************************************/
 cAmp *cAmpGlobal::index2amp(int pos)
 {
-       amp_lock io_lock(&mutex_amp);
+       lock();
        cAmp *tmp = (cAmp *)0;
        int count = amp_array.size();
        if(pos > 0 && pos <= count) {
                pos--;
                tmp = amp_array[pos];
        }
-
+       unlock();
        return tmp;
 }
 
@@ -148,12 +152,13 @@
  ***********************************************************/
 bool cAmpGlobal::add(cAmp *nu_amp)
 {
-       amp_lock io_lock(&mutex_amp);
+       lock();
        bool ret = false;
        if(nu_amp) {
                amp_array.push_back(nu_amp);
                ret = true;
        }
+       unlock();
 
        return ret;
 }
@@ -163,7 +168,7 @@
  ***********************************************************/
 bool cAmpGlobal::remove(cAmp *src_amp)
 {
-       amp_lock io_lock(&mutex_amp);
+       lock();
        bool ret = false;
 
        if(src_amp) {
@@ -182,6 +187,7 @@
                }
        }
 
+       unlock();
        return ret;
 }
 
@@ -190,8 +196,7 @@
  ***********************************************************/
 bool cAmpGlobal::remove(int pos)
 {
-       amp_lock io_lock(&mutex_amp);
-       
+       lock();
        int count = amp_array.size();
        bool ret = false;
        cAmp *tmp = (cAmp *)0;
@@ -205,7 +210,7 @@
                if(tmp) delete tmp;
                ret = true;
        }
-
+       unlock();
        return ret;
 }
 
@@ -214,9 +219,9 @@
  ***********************************************************/
 void cAmpGlobal::free(cAmp *tmp)
 {
-       amp_lock io_lock(&mutex_amp);
-       
+       lock();
        if(amp) delete amp;
+       unlock();
 }
 
 extern std::string flamp_relay_dir;
@@ -225,7 +230,7 @@
  *
  ***********************************************************/
 void cAmpGlobal::relay_write_save(cAmp *amp)
-{      
+{
        std::string relay_data;
 
        if(!amp) return;
@@ -264,15 +269,15 @@
  ***********************************************************/
 void cAmpGlobal::save_all_relay(void)
 {
-       amp_lock io_lock(&mutex_amp);
+       lock();
        cAmp *amp = 0;
        int size = amp_array.size();
        for (int i = 0; i < size; i++) {
                amp = amp_array[i];
-               if(amp) {
+               if(amp)
                        relay_write_save(amp);
-               }
        }
+       unlock();
 }
 
 /** ********************************************************
@@ -280,6 +285,7 @@
  ***********************************************************/
 void cAmpGlobal::free_all(void)
 {
+       lock();
        cAmp *amp = 0;
        int size = amp_array.size();
        for (int i = 0; i < size; i++) {
@@ -291,6 +297,7 @@
                }
        }
        amp_array.clear();
+       unlock();
 }
 
 /** ********************************************************
@@ -298,9 +305,9 @@
  ***********************************************************/
 size_t cAmpGlobal::size(void)
 {
-       amp_lock io_lock(&mutex_amp);;
+       lock();
        size_t count = (size_t) amp_array.size();
-
+       unlock();
        return count;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flamp-2.2.13/src/utils/transmit_camp.cxx 
new/flamp-2.2.14/src/utils/transmit_camp.cxx
--- old/flamp-2.2.13/src/utils/transmit_camp.cxx        2024-07-08 
22:03:49.000000000 +0200
+++ new/flamp-2.2.14/src/utils/transmit_camp.cxx        2024-07-09 
21:50:38.000000000 +0200
@@ -98,7 +98,7 @@
 {
        if (!ptr) return;
        if (fldigi_state != FLDIGI_ONLINE) return;
-
+       
        std::string *data = (std::string *)ptr;
        transfer(*data);
 }
@@ -793,22 +793,12 @@
  ***********************************************************/
 void * transmit_relay_interval(void * ptr)
 {
-       cAmp *tx = (cAmp *)0;
-       int vector_data_count = 0;
-       int vector_header_count = 0;
-       RELAY_DATA *relay_data = (RELAY_DATA *) 0;
-       std::string send_to = "";
-       std::string tail;
-       std::string temp;
-       std::vector<std::string> vector_data;
-       std::vector<std::string> vector_header_data;
-
        transmitting = true;
        static bool in_use = false;
-       TX_FLDIGI_THREAD *thread_ptr = (TX_FLDIGI_THREAD *)ptr;
 
-       if(in_use || !ptr)
+       if(in_use) {
                return run_in_thread_destroy((TX_FLDIGI_THREAD *) ptr, 3, 0);
+       }
 
        in_use = true;
 
@@ -817,12 +807,22 @@
        Fl::awake(set_relay_button_label, (void *) msg);
        }
 
-       {
-       guard_lock lk(&thread_ptr->mutex);
+       cAmp *tx = (cAmp *)0;
+       int vector_data_count = 0;
+       int vector_header_count = 0;
+       RELAY_DATA *relay_data = (RELAY_DATA *) 0;
+       std::string send_to = "";
+       std::string tail;
+       std::string temp;
+       std::vector<std::string> vector_data;
+       std::vector<std::string> vector_header_data;
+       TX_FLDIGI_THREAD *thread_ptr = (TX_FLDIGI_THREAD *)ptr;
 
+       pthread_mutex_lock(&thread_ptr->mutex);
        thread_ptr->thread_running = 1;
        thread_ptr->exit_thread = 0;
-
+       pthread_mutex_unlock(&thread_ptr->mutex);
+       
        relay_data = (RELAY_DATA *) thread_ptr->data;
 
        if(!relay_data)
@@ -834,9 +834,9 @@
 
        vector_header_data = relay_data->header;
        vector_header_count = vector_header_data.size();
+
        vector_data = relay_data->data;
        vector_data_count = vector_data.size();
-       }
 
        if((vector_header_count < 1) && (vector_data_count < 1)) {
                LOG_DEBUG("Empty xmt_vector_string");
@@ -849,7 +849,6 @@
 
        send_to.clear();
        send_to.append(" DE ").append(progStatus.my_call);
-
        for (size_t n = 0; n < send_to.length(); n++)
        send_to[n] = toupper(send_to[n]);
 
@@ -870,7 +869,6 @@
                send_vector_to_fldigi(thread_ptr, thread_ptr->modem, tail, 
vector_data, thread_ptr->mode, tx);
 
        event_bail_flag = false;
-
        return run_in_thread_destroy(thread_ptr, 3, &in_use);
 }
 
@@ -1401,7 +1399,7 @@
        return false;
 }
 
-// #define LOG_TIME_WAIT
+//#define LOG_TIME_WAIT
 #undef LOG_TIME_WAIT
 
 /** ********************************************************

Reply via email to