diff --git a/YSFGateway/Conf.cpp b/YSFGateway/Conf.cpp index c3ae505..cf00739 100644 --- a/YSFGateway/Conf.cpp +++ b/YSFGateway/Conf.cpp @@ -81,7 +81,7 @@ m_ysfNetworkYSF2NXDNPort(0U), m_ysfNetworkYSF2P25Address("127.0.0.1"), m_ysfNetworkYSF2P25Port(0U), m_fcsNetworkEnabled(false), -m_fcsNetworkEntries(), +m_fcsNetworkFile(), m_fcsNetworkPort(0U) { } @@ -228,19 +228,9 @@ bool CConf::read() } else if (section == SECTION_FCS_NETWORK) { if (::strcmp(key, "Enable") == 0) m_fcsNetworkEnabled = ::atoi(value) == 1; - else if (::strcmp(key, "Entry") == 0) { - char* p1 = ::strtok(value, ","); - char* p2 = ::strtok(NULL, "\r\n"); - if (p1 != NULL && p2 != NULL) { - if (::strlen(p1) > 0U && ::strlen(p2) > 0U) { - for (unsigned int i = 0U; p1[i] != 0; i++) - p1[i] = ::toupper(p1[i]); - std::string name = std::string(p1); - std::string desc = std::string(p2); - m_fcsNetworkEntries.push_back(std::make_pair(name, desc)); - } - } - } else if (::strcmp(key, "Port") == 0) + else if (::strcmp(key, "Rooms") == 0) + m_fcsNetworkFile = value; + else if (::strcmp(key, "Port") == 0) m_fcsNetworkPort = (unsigned int)::atoi(value); } } @@ -460,9 +450,9 @@ bool CConf::getFCSNetworkEnabled() const return m_fcsNetworkEnabled; } -std::vector> CConf::getFCSNetworkEntries() const +std::string CConf::getFCSNetworkFile() const { - return m_fcsNetworkEntries; + return m_fcsNetworkFile; } unsigned int CConf::getFCSNetworkPort() const diff --git a/YSFGateway/Conf.h b/YSFGateway/Conf.h index 3305451..a7310f8 100644 --- a/YSFGateway/Conf.h +++ b/YSFGateway/Conf.h @@ -20,7 +20,6 @@ #define CONF_H #include -#include class CConf { @@ -85,7 +84,7 @@ public: // The FCS Network section bool getFCSNetworkEnabled() const; - std::vector> getFCSNetworkEntries() const; + std::string getFCSNetworkFile() const; unsigned int getFCSNetworkPort() const; private: @@ -138,7 +137,7 @@ private: unsigned int m_ysfNetworkYSF2P25Port; bool m_fcsNetworkEnabled; - std::vector> m_fcsNetworkEntries; + std::string m_fcsNetworkFile; unsigned int m_fcsNetworkPort; }; diff --git a/YSFGateway/FCSNetwork.cpp b/YSFGateway/FCSNetwork.cpp index 3d2c0bf..d066e64 100644 --- a/YSFGateway/FCSNetwork.cpp +++ b/YSFGateway/FCSNetwork.cpp @@ -48,8 +48,10 @@ m_state(FCS_UNLINKED) ::memset(m_info + 43U, ' ', 57U); m_ping = new unsigned char[25U]; - ::sprintf((char*)m_ping, "PING%6.6s", callsign.c_str()); - ::memset(m_ping + 10U, ' ', 15U); + ::memcpy(m_ping + 0U, "PING", 4U); + ::memset(m_ping + 4U, ' ', 6U); + ::memcpy(m_ping + 4U, callsign.c_str(), callsign.size()); + ::memset(m_ping + 10U, 0x00U, 15U); } CFCSNetwork::~CFCSNetwork() diff --git a/YSFGateway/FCSRooms.txt b/YSFGateway/FCSRooms.txt new file mode 100644 index 0000000..dc7a2d1 --- /dev/null +++ b/YSFGateway/FCSRooms.txt @@ -0,0 +1,232 @@ +# FCS_Hosts.txt downloaded from http://www.pistar.uk/downloads/FCS_Hosts.txt +# Sourced from PiStar.UK Update Server +# File created at Tuesday 8th of May 2018 01:20:49 AM BST +FCS00100;Repeater;FCS001 - Repeater;;; +FCS00101;Deutschland;FCS001 - Deutschland;;; +FCS00102;World Wide ;FCS001 - World Wide ;;; +FCS00103;Switzerland;FCS001 - Switzerland;;; +FCS00104;Denmark;FCS001 - Denmark;;; +FCS00105;Great Britain;FCS001 - Great Britain;;; +FCS00106;United States of America;FCS001 - United States of America;;; +FCS00107;Netherlands;FCS001 - Netherlands;;; +FCS00108;South korea;FCS001 - South korea;;; +FCS00109;Austria;FCS001 - Austria;;; +FCS00110;Sweden;FCS001 - Sweden;;; +FCS00111;Belgium;FCS001 - Belgium;;; +FCS00112;Portugal;FCS001 - Portugal;;; +FCS00113;Norway;FCS001 - Norway;;; +FCS00114;Australia;FCS001 - Australia;;; +FCS00115;Test System;FCS001 - Test System;;; +FCS00116;Brazil;FCS001 - Brazil;;; +FCS00117;Canada;FCS001 - Canada;;; +FCS00118;Spain;FCS001 - Spain;;; +FCS00119;Czech;FCS001 - Czech;;; +FCS00120;Slovakia;FCS001 - Slovakia;;; +FCS00121;Japan;FCS001 - Japan;;; +FCS00122;THAILAND;FCS001 - THAILAND;;; +FCS00123;Bulgaria;FCS001 - Bulgaria;;; +FCS00124; United States of America2;FCS001 - United States of America2;;; +FCS00125;Hungary;FCS001 - Hungary;;; +FCS00126;Polen;FCS001 - Polen;;; +FCS00127;Italy2;FCS001 - Italy2;;; +FCS00128;Australia;FCS001 - Australia;;; +FCS00129;Canada;FCS001 - Canada;;; +FCS00130;Iwate001jp-net;FCS001 - Iwate001jp-net;;; +FCS00131;Hessen;FCS001 - Hessen;;; +FCS00132;Luxembourg;FCS001 - Luxembourg;;; +FCS00133;Franc;FCS001 - Franc;;; +FCS00134;Greece;FCS001 - Greece;;; +FCS00135;Mecklenburg-Vorpommern;FCS001 - Mecklenburg-Vorpommern;;; +FCS00136;Sendai;FCS001 - Sendai;;; +FCS00139;China;FCS001 - China;;; +FCS00140;Spain2;FCS001 - Spain2;;; +FCS00141;HB9DR;FCS001 - HB9DR;;; +FCS00142;Repeater Schweiz;FCS001 - Repeater Schweiz;;; +FCS00143;GL/GR Room Schweiz;FCS001 - GL/GR Room Schweiz;;; +FCS00144;Zuerich/Schweiz;FCS001 - Zuerich/Schweiz;;; +FCS00146;DL-NORDWEST;FCS001 - DL-NORDWEST;;; +FCS00147;Kurpfalz;FCS001 - Kurpfalz;;; +FCS00150;Canada;FCS001 - Canada;;; +FCS00156;Elbe-Weser;FCS001 - Elbe-Weser;;; +FCS00160;CATALUNYA;FCS001 - CATALUNYA;;; +FCS00166;Nord-Ostsee-Link;FCS001 - Nord-Ostsee-Link;;; +FCS00167;Baden-Pfalz;FCS001 - Baden-Pfalz;;; +FCS00169;Italy;FCS001 - Italy;;; +FCS00170;SoCal Link Society;FCS001 - SoCal Link Society;;; +FCS00171;ARGENTINA LINK;FCS001 - ARGENTINA LINK;;; +FCS00173;phillipines;FCS001 - phillipines;;; +FCS00180;Schleswig-Holstein;FCS001 - Schleswig-Holstein;;; +FCS00186;GAUCHOS DEL SUR;FCS001 - GAUCHOS DEL SUR;;; +FCS00187;Rhein-Main / Wetterau;FCS001 - Rhein-Main / Wetterau;;; +FCS00188;TIROLER OBERLAND;FCS001 - TIROLER OBERLAND;;; +FCS00189;OE9/Vorarlberg;FCS001 - OE9/Vorarlberg;;; +FCS00192;Dongle User OE;FCS001 - Dongle User OE;;; +FCS00198;C4FM OE8;FCS001 - C4FM OE8;;; +FCS00199;ECHO;FCS001 - ECHO;;; +FCS00200;TALK USA1;FCS002 - TALK USA1;;; +FCS00201;TALK USA2;FCS002 - TALK USA2;;; +FCS00202;Alabama;FCS002 - Alabama;;; +FCS00203;Alaska;FCS002 - Alaska;;; +FCS00204;Arizona;FCS002 - Arizona;;; +FCS00205;Arkansas;FCS002 - Arkansas;;; +FCS00206;California;FCS002 - California;;; +FCS00207;Colorado;FCS002 - Colorado;;; +FCS00208;Connecticut;FCS002 - Connecticut;;; +FCS00209;Delaware;FCS002 - Delaware;;; +FCS00210;Florida;FCS002 - Florida;;; +FCS00211;Georgia;FCS002 - Georgia;;; +FCS00212;Hawaii;FCS002 - Hawaii;;; +FCS00213;Idaho;FCS002 - Idaho;;; +FCS00214;Illinois;FCS002 - Illinois;;; +FCS00215;Indiana;FCS002 - Indiana;;; +FCS00216;Iowa;FCS002 - Iowa;;; +FCS00217;Kansas;FCS002 - Kansas;;; +FCS00218;Louisiana;FCS002 - Louisiana;;; +FCS00219;Maine;FCS002 - Maine;;; +FCS00220;Maryland;FCS002 - Maryland;;; +FCS00221;Massachusetts;FCS002 - Massachusetts;;; +FCS00222;Michigan;FCS002 - Michigan;;; +FCS00223;Minnesota;FCS002 - Minnesota;;; +FCS00224;Mississippi;FCS002 - Mississippi;;; +FCS00225;Missouri;FCS002 - Missouri;;; +FCS00226;Montana;FCS002 - Montana;;; +FCS00227;Nebraska;FCS002 - Nebraska;;; +FCS00228;Nevada;FCS002 - Nevada;;; +FCS00229;New Hampshire;FCS002 - New Hampshire;;; +FCS00230;New Jersey;FCS002 - New Jersey;;; +FCS00231;New Mexico;FCS002 - New Mexico;;; +FCS00232;New York;FCS002 - New York;;; +FCS00233;North Carolina;FCS002 - North Carolina;;; +FCS00234;North Dakota;FCS002 - North Dakota;;; +FCS00235;Ohio;FCS002 - Ohio;;; +FCS00236;Oklahoma;FCS002 - Oklahoma;;; +FCS00237;Oregon;FCS002 - Oregon;;; +FCS00238;Pennsylvania;FCS002 - Pennsylvania;;; +FCS00239;Rhode Island;FCS002 - Rhode Island;;; +FCS00240;South Carolina;FCS002 - South Carolina;;; +FCS00241;South Dakota;FCS002 - South Dakota;;; +FCS00242;Tennessee;FCS002 - Tennessee;;; +FCS00243;Texas;FCS002 - Texas;;; +FCS00244;Utah;FCS002 - Utah;;; +FCS00245;Vermont;FCS002 - Vermont;;; +FCS00246;Virginia;FCS002 - Virginia;;; +FCS00247;Washington;FCS002 - Washington;;; +FCS00248;West Virginia;FCS002 - West Virginia;;; +FCS00249;Wisconsin;FCS002 - Wisconsin;;; +FCS00250;Wyoming;FCS002 - Wyoming;;; +FCS00251;AREC;FCS002 - AREC;;; +FCS00253;Puerto Rico;FCS002 - Puerto Rico;;; +FCS00255;Central Alabama;FCS002 - Central Alabama;;; +FCS00256;Northeast Florida;FCS002 - Northeast Florida;;; +FCS00259;Public Safety ARG;FCS002 - Public Safety ARG;;; +FCS00260;AB2BH-AZ;FCS002 - AB2BH-AZ;;; +FCS00261;Belfast;FCS002 - Belfast;;; +FCS00269;Illinois Link;FCS002 - Illinois Link;;; +FCS00270;SoCal Link Society;FCS002 - SoCal Link Society;;; +FCS00271;SoCal Link Society;FCS002 - SoCal Link Society;;; +FCS00275;Wires-X Spain;FCS002 - Wires-X Spain;;; +FCS00280;Canada english;FCS002 - Canada english;;; +FCS00281;Canada francais;FCS002 - Canada francais;;; +FCS00284;NJ-NY RGNL;FCS002 - NJ-NY RGNL;;; +FCS00285;America-Ragchew (Wires-X);FCS002 - America-Ragchew (Wires-X);;; +FCS00288;KK4GAF;FCS002 - KK4GAF;;; +FCS00290;America Link WIRES-X;FCS002 - America Link WIRES-X;;; +FCS00291;CQ-UK WIRES-X;FCS002 - CQ-UK WIRES-X;;; +FCS00298;Software Test;FCS002 - Software Test;;; +FCS00299;ECHO;FCS002 - ECHO;;; +FCS00300;Group SYSOP chat ROOM;FCS003 - Group SYSOP chat ROOM;;; +FCS00301;FUSION-CANADA-FR;FCS003 - FUSION-CANADA-FR;;; +FCS00302;FUSION-QUEBEC-EN;FCS003 - FUSION-QUEBEC-EN;;; +FCS00303;Newfoundland and Labrador;FCS003 - Newfoundland and Labrador;;; +FCS00304;PEI;FCS003 - PEI;;; +FCS00305;New Brunswick;FCS003 - New Brunswick;;; +FCS00306;Ontario;FCS003 - Ontario;;; +FCS00307;Manitoba;FCS003 - Manitoba;;; +FCS00308;Saskatchewan;FCS003 - Saskatchewan;;; +FCS00309;Alberta;FCS003 - Alberta;;; +FCS00310;British Columbia;FCS003 - British Columbia;;; +FCS00311;Yukon / NWT / Nunavut;FCS003 - Yukon / NWT / Nunavut;;; +FCS00312;New England USA-East;FCS003 - New England USA-East;;; +FCS00314;NILECOMM;FCS003 - NILECOMM;;; +FCS00315;PA-Fl Link Society;FCS003 - PA-Fl Link Society;;; +FCS00316;San Diego;FCS003 - San Diego;;; +FCS00317;VA7GH Test Room;FCS003 - VA7GH Test Room;;; +FCS00318;ALOHA-HAWAII Wires-X;FCS003 - ALOHA-HAWAII Wires-X;;; +FCS00320;Irish Group;FCS003 - Irish Group;;; +FCS00321;CARS Nevada;FCS003 - CARS Nevada;;; +FCS00325;D.A.R.N.;FCS003 - D.A.R.N.;;; +FCS00328;SouthEast Mississippi;FCS003 - SouthEast Mississippi;;; +FCS00330;TeXaS-I35;FCS003 - TeXaS-I35;;; +FCS00333;Carolina Link;FCS003 - Carolina Link;;; +FCS00334;TEXAS - NEXUS;FCS003 - TEXAS - NEXUS;;; +FCS00335;Ohio NET;FCS003 - Ohio NET;;; +FCS00346;SAT-DRC;FCS003 - SAT-DRC;;; +FCS00350;LEO-ARC;FCS003 - LEO-ARC;;; +FCS00355;WINSCONSIN LINK;FCS003 - WINSCONSIN LINK;;; +FCS00358;Alabama Link;FCS003 - Alabama Link;;; +FCS00369;Midwest Hub;FCS003 - Midwest Hub;;; +FCS00370;SoCal Link Network;FCS003 - SoCal Link Network;;; +FCS00371;SoCal Link Society Café;FCS003 - SoCal Link Society Café;;; +FCS00372;ND6C-OpenSPOT Network;FCS003 - ND6C-OpenSPOT Network;;; +FCS00373;PINOYHAMS;FCS003 - PINOYHAMS;;; +FCS00376;Montivilliers C4FM / F4ETA;FCS003 - Montivilliers C4FM / F4ETA;;; +FCS00377;WXCTAC;FCS003 - WXCTAC;;; +FCS00385;Haïti System Fusion - HH2MJF;FCS003 - Haïti System Fusion - HH2MJF;;; +FCS00390;America Link Wires-X;FCS003 - America Link Wires-X;;; +FCS00397;DV4Home Test ROOM;FCS003 - DV4Home Test ROOM;;; +FCS00398;DV4mini Test ROOM;FCS003 - DV4mini Test ROOM;;; +FCS00399;ECHO;FCS003 - ECHO;;; +FCS00400;WIRES-X-SPAIN;FCS004 - WIRES-X-SPAIN;;; +FCS00401;EA-DISTRITO 1;FCS004 - EA-DISTRITO 1;;; +FCS00402;EA-DISTRITO 2;FCS004 - EA-DISTRITO 2;;; +FCS00403;EA-DISTRITO 3;FCS004 - EA-DISTRITO 3;;; +FCS00404;EA-DISTRITO 4;FCS004 - EA-DISTRITO 4;;; +FCS00405;EA-DISTRITO 5;FCS004 - EA-DISTRITO 5;;; +FCS00406;EA-DISTRITO 6;FCS004 - EA-DISTRITO 6;;; +FCS00407;EA-DISTRITO 7;FCS004 - EA-DISTRITO 7;;; +FCS00408;EA-DISTRITO 8;FCS004 - EA-DISTRITO 8;;; +FCS00409;EA-DISTRITO 9;FCS004 - EA-DISTRITO 9;;; +FCS00410;Republica Dominicana;FCS004 - Republica Dominicana;;; +FCS00411;DMR TG 314233 & Wires-X;FCS004 - DMR TG 314233 & Wires-X;;; +FCS00412;DVMEGA-WIRES-X-UK;FCS004 - DVMEGA-WIRES-X-UK;;; +FCS00413;Republica de Panama;FCS004 - Republica de Panama;;; +FCS00414;Guatemala;FCS004 - Guatemala;;; +FCS00415;Great Britain;FCS004 - Great Britain;;; +FCS00416;Miami Latino;FCS004 - Miami Latino;;; +FCS00417;Southern Germany;FCS004 - Southern Germany;;; +FCS00418;DCS018 Test;FCS004 - DCS018 Test;;; +FCS00419;Middle Germany;FCS004 - Middle Germany;;; +FCS00420;CQ-UK Wires-X Room;FCS004 - CQ-UK Wires-X Room;;; +FCS00421;Campania;FCS004 - Campania;;; +FCS00422;(America-Ragchew) Wires-X;FCS004 - (America-Ragchew) Wires-X;;; +FCS00423;Hertfordshire RAYNET;FCS004 - Hertfordshire RAYNET;;; +FCS00424;Fusion Latina Wiresx 41067;FCS004 - Fusion Latina Wiresx 41067;;; +FCS00425;Scotland;FCS004 - Scotland;;; +FCS00426;Oost Nederland room;FCS004 - Oost Nederland room;;; +FCS00427;Scout&Guide JOTA;FCS004 - Scout&Guide JOTA;;; +FCS00428;NWFG;FCS004 - NWFG;;; +FCS00429;N0ZQB-Repeater;FCS004 - N0ZQB-Repeater;;; +FCS00430;Dmr To CQ-UK Wires-X Room;FCS004 - Dmr To CQ-UK Wires-X Room;;; +FCS00431;UKHUB;FCS004 - UKHUB;;; +FCS00432;LincsLink;FCS004 - LincsLink;;; +FCS00434;N8UKF Repeater Group;FCS004 - N8UKF Repeater Group;;; +FCS00435;WORLD WIDE DX LINK SYSTEM;FCS004 - WORLD WIDE DX LINK SYSTEM;;; +FCS00440;WIRES X 27187;FCS004 - WIRES X 27187;;; +FCS00441;Sevilla TG21441;FCS004 - Sevilla TG21441;;; +FCS00450;LEO-ARC;FCS004 - LEO-ARC;;; +FCS00451;RFIT;FCS004 - RFIT;;; +FCS00455;Oldham Radio Club Fusion Group;FCS004 - Oldham Radio Club Fusion Group;;; +FCS00460;UNITED-KINGDOM-NET Wires-X Room;FCS004 - UNITED-KINGDOM-NET Wires-X Room;;; +FCS00469;SE Mississippi;FCS004 - SE Mississippi;;; +FCS00470;DMR+ 4370 Test;FCS004 - DMR+ 4370 Test;;; +FCS00473;SOTA;FCS004 - SOTA;;; +FCS00474;DMR+ 4374 Test;FCS004 - DMR+ 4374 Test;;; +FCS00475;WORLDWIDE-WIRES (21067);FCS004 - WORLDWIDE-WIRES (21067);;; +FCS00480;belfast mi5daw;FCS004 - belfast mi5daw;;; +FCS00482;Netherlands;FCS004 - Netherlands;;; +FCS00486;ARGENTINA-WIRES-X;FCS004 - ARGENTINA-WIRES-X;;; +FCS00488;Philippine-Link;FCS004 - Philippine-Link;;; +FCS00496;RC Veleta;FCS004 - RC Veleta;;; +FCS00497;APRS Room;FCS004 - APRS Room;;; +FCS00498;Hotspot Test;FCS004 - Hotspot Test;;; +FCS00499;ECHO;FCS004 - ECHO;;; diff --git a/YSFGateway/Version.h b/YSFGateway/Version.h index 94226b8..20e52a6 100644 --- a/YSFGateway/Version.h +++ b/YSFGateway/Version.h @@ -19,6 +19,6 @@ #if !defined(VERSION_H) #define VERSION_H -const char* VERSION = "20180315"; +const char* VERSION = "20180509"; #endif diff --git a/YSFGateway/WiresX.cpp b/YSFGateway/WiresX.cpp index a655bee..b7d9380 100644 --- a/YSFGateway/WiresX.cpp +++ b/YSFGateway/WiresX.cpp @@ -167,9 +167,9 @@ void CWiresX::setYSF2P25(const std::string& address, unsigned int port) m_reflectors.setYSF2P25(address, port); } -void CWiresX::addFCSRoom(const std::pair& entry) +void CWiresX::addFCSRoom(const std::string& id, const std::string& name) { - m_reflectors.addFCSRoom(entry); + m_reflectors.addFCSRoom(id, name); } bool CWiresX::start() diff --git a/YSFGateway/WiresX.h b/YSFGateway/WiresX.h index 9c2aab5..83987c1 100644 --- a/YSFGateway/WiresX.h +++ b/YSFGateway/WiresX.h @@ -51,7 +51,7 @@ public: void setYSF2DMR(const std::string& address, unsigned int port); void setYSF2NXDN(const std::string& address, unsigned int port); void setYSF2P25(const std::string& address, unsigned int port); - void addFCSRoom(const std::pair& entry); + void addFCSRoom(const std::string& id, const std::string& name); bool start(); diff --git a/YSFGateway/YSFGateway.cpp b/YSFGateway/YSFGateway.cpp index de80204..3727b05 100644 --- a/YSFGateway/YSFGateway.cpp +++ b/YSFGateway/YSFGateway.cpp @@ -475,9 +475,8 @@ void CYSFGateway::createWiresX(CYSFNetwork* rptNetwork) if (port > 0U) m_wiresX->setYSF2P25(address, port); - std::vector> entries = m_conf.getFCSNetworkEntries(); - for (std::vector>::const_iterator it = entries.cbegin(); it != entries.cend(); ++it) - m_wiresX->addFCSRoom(*it); + std::string filename = m_conf.getFCSNetworkFile(); + readFCSRoomsFile(filename); m_reflectors->load(); m_wiresX->start(); @@ -772,3 +771,30 @@ void CYSFGateway::startupLinking() } } } + +void CYSFGateway::readFCSRoomsFile(const std::string& filename) +{ + FILE* fp = ::fopen(filename.c_str(), "rt"); + if (fp == NULL) + return; + + unsigned int count = 0U; + + char buffer[200U]; + while (::fgets(buffer, 200, fp) != NULL) { + if (buffer[0U] == '#') + continue; + + char* p1 = ::strtok(buffer, ";"); + char* p2 = ::strtok(NULL, ";"); + + if (p1 != NULL && p2 != NULL) { + m_wiresX->addFCSRoom(p1, p2); + count++; + } + } + + ::fclose(fp); + + LogInfo("Loaded %u FCS room descriptions", count); +} diff --git a/YSFGateway/YSFGateway.h b/YSFGateway/YSFGateway.h index 238277c..c6e702e 100644 --- a/YSFGateway/YSFGateway.h +++ b/YSFGateway/YSFGateway.h @@ -67,6 +67,7 @@ private: void processDTMF(unsigned char* buffer, unsigned char dt); void createWiresX(CYSFNetwork* rptNetwork); void createGPS(); + void readFCSRoomsFile(const std::string& filename); }; #endif diff --git a/YSFGateway/YSFGateway.ini b/YSFGateway/YSFGateway.ini index 28c6de5..977ba17 100644 --- a/YSFGateway/YSFGateway.ini +++ b/YSFGateway/YSFGateway.ini @@ -57,6 +57,5 @@ YSF2P25Port=42015 [FCS Network] Enable=1 -# Entry=FCS00199,FCS001 Echo -# Entry=FCS00299,FCS002 Echo +Rooms=./FCSRooms.txt Port=42001 diff --git a/YSFGateway/YSFReflectors.cpp b/YSFGateway/YSFReflectors.cpp index ee93aa9..a263760 100644 --- a/YSFGateway/YSFReflectors.cpp +++ b/YSFGateway/YSFReflectors.cpp @@ -99,9 +99,9 @@ void CYSFReflectors::setYSF2P25(const std::string& address, unsigned int port) m_YSF2P25Port = port; } -void CYSFReflectors::addFCSRoom(const std::pair& entry) +void CYSFReflectors::addFCSRoom(const std::string& id, const std::string& name) { - m_fcsRooms.push_back(entry); + m_fcsRooms.push_back(std::make_pair(id, name)); } bool CYSFReflectors::load() @@ -237,8 +237,6 @@ bool CYSFReflectors::load() refl->m_desc.resize(14U, ' '); m_newReflectors.push_back(refl); - - LogInfo("Loaded %s", name.c_str()); } size = m_newReflectors.size(); diff --git a/YSFGateway/YSFReflectors.h b/YSFGateway/YSFReflectors.h index b30e5e7..cbbdeb7 100644 --- a/YSFGateway/YSFReflectors.h +++ b/YSFGateway/YSFReflectors.h @@ -61,7 +61,7 @@ public: void setYSF2DMR(const std::string& address, unsigned int port); void setYSF2NXDN(const std::string& address, unsigned int port); void setYSF2P25(const std::string& address, unsigned int port); - void addFCSRoom(const std::pair& entry); + void addFCSRoom(const std::string& id, const std::string& name); bool load();