diff --git a/QnetITAP.cpp b/QnetITAP.cpp index 4bea0fe..f2af160 100644 --- a/QnetITAP.cpp +++ b/QnetITAP.cpp @@ -45,7 +45,7 @@ #include "QnetConfigure.h" #include "Timer.h" -#define ITAP_VERSION "QnetITAP-2.1.1" +#define ITAP_VERSION "QnetITAP-2.1.2" std::atomic CQnetITAP::keep_running(true); @@ -275,6 +275,16 @@ void CQnetITAP::Run(const char *cfgfile) if (! is_alive) { printf("Icom Radio is connected.\n"); is_alive = true; + struct stat sbuf; + if (stat(FILE_QNVOICE_FILE.c_str(), &sbuf)) { + // yes, there is no FILE_QNVOICE_FILE, so create it + FILE *fp = fopen(FILE_QNVOICE_FILE.c_str(), "w"); + if (fp) { + fprintf(fp, "%c_radio_connected.dat_WELCOME_TO_QUADNET", RPTR_MOD); + fclose(fp); + } else + fprintf(stderr, "could not open %s\n", FILE_QNVOICE_FILE.c_str()); + } } break; default: @@ -538,6 +548,7 @@ bool CQnetITAP::ReadConfig(const char *cfgFile) } cfg.GetValue("log_qso", estr, log_qso); + cfg.GetValue("file_qnvoice_file", estr, FILE_QNVOICE_FILE, 2, FILENAME_MAX); return false; } diff --git a/QnetITAP.h b/QnetITAP.h index 5e07200..07db564 100644 --- a/QnetITAP.h +++ b/QnetITAP.h @@ -126,6 +126,7 @@ private: // config data char RPTR_MOD; std::string ITAP_DEVICE, RPTR; + std::string FILE_QNVOICE_FILE; bool log_qso; // parameters diff --git a/announce/radio_connected.dat b/announce/radio_connected.dat new file mode 100644 index 0000000..1a4b8b5 Binary files /dev/null and b/announce/radio_connected.dat differ