@ -88,27 +88,27 @@ bool CIRCDDBClient::sendHeard( const std::string& myCall, const std::string& myC
const std : : string & rpt2 , unsigned char flag1 , unsigned char flag2 , unsigned char flag3 )
{
if ( myCall . size ( ) ! = 8 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeard:myCall='%s' len != 8 \n " , myCall . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeard:myCall='%s' len != 8 \n " , myCall . c_str ( ) ) ;
return false ;
}
if ( myCallExt . size ( ) ! = 4 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeard:myCallExt='%s' len != 4 \n " , myCallExt . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeard:myCallExt='%s' len != 4 \n " , myCallExt . c_str ( ) ) ;
return false ;
}
if ( yourCall . size ( ) ! = 8 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeard:yourCall='%s' len != 8 \n " , yourCall . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeard:yourCall='%s' len != 8 \n " , yourCall . c_str ( ) ) ;
return false ;
}
if ( rpt1 . size ( ) ! = 8 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeard:rpt1='%s' len != 8 \n " , rpt1 . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeard:rpt1='%s' len != 8 \n " , rpt1 . c_str ( ) ) ;
return false ;
}
if ( rpt2 . size ( ) ! = 8 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeard:rpt2='%s' len != 8 \n " , rpt2 . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeard:rpt2='%s' len != 8 \n " , rpt2 . c_str ( ) ) ;
return false ;
}
@ -117,7 +117,7 @@ bool CIRCDDBClient::sendHeard( const std::string& myCall, const std::string& myC
void CIRCDDBClient : : sendDStarGatewayInfo ( const std : : string subcommand , const std : : vector < std : : string > parms )
{
CLog : : log Info ( " CIRCDDBClient::sendDStarGatewayInfo subcommand %s parms " , subcommand . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendDStarGatewayInfo subcommand %s parms " , subcommand . c_str ( ) ) ;
for ( unsigned int i = 0 ; i < parms . size ( ) ; i + + )
CLog : : logInfo ( " %s " , parms [ i ] . c_str ( ) ) ;
CLog : : logInfo ( " \n " ) ;
@ -132,27 +132,27 @@ bool CIRCDDBClient::sendHeardWithTXMsg(const std::string& myCall, const std::str
const std : : string & rpt2 , unsigned char flag1 , unsigned char flag2 , unsigned char flag3 , const std : : string & network_destination , const std : : string & tx_message )
{
if ( myCall . size ( ) ! = 8 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXMsg:myCall='%s' len != 8 \n " , myCall . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXMsg:myCall='%s' len != 8 \n " , myCall . c_str ( ) ) ;
return false ;
}
if ( myCallExt . size ( ) ! = 4 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXMsg:myCallExt='%s' len != 4 \n " , myCallExt . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXMsg:myCallExt='%s' len != 4 \n " , myCallExt . c_str ( ) ) ;
return false ;
}
if ( yourCall . size ( ) ! = 8 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXMsg:yourCall='%s' len != 8 \n " , yourCall . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXMsg:yourCall='%s' len != 8 \n " , yourCall . c_str ( ) ) ;
return false ;
}
if ( rpt1 . size ( ) ! = 8 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXMsg:rpt1='%s' len != 8 \n " , rpt1 . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXMsg:rpt1='%s' len != 8 \n " , rpt1 . c_str ( ) ) ;
return false ;
}
if ( rpt2 . size ( ) ! = 8 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXMsg:rpt2='%s' len != 8 \n " , rpt2 . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXMsg:rpt2='%s' len != 8 \n " , rpt2 . c_str ( ) ) ;
return false ;
}
@ -161,7 +161,7 @@ bool CIRCDDBClient::sendHeardWithTXMsg(const std::string& myCall, const std::str
dest = std : : string ( " " ) ;
if ( 8 ! = dest . size ( ) ) {
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXMsg:network_destination='%s' len != 8 \n " , dest . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXMsg:network_destination='%s' len != 8 \n " , dest . c_str ( ) ) ;
return false ;
}
@ -184,42 +184,42 @@ bool CIRCDDBClient::sendHeardWithTXStats( const std::string& myCall, const std::
const std : : string & rpt2 , unsigned char flag1 , unsigned char flag2 , unsigned char flag3 , int num_dv_frames , int num_dv_silent_frames , int num_bit_errors )
{
if ( ( num_dv_frames < = 0 ) | | ( num_dv_frames > 65535 ) ) {
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXStats:num_dv_frames=%d not in range 1-65535 \n " , num_dv_frames ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXStats:num_dv_frames=%d not in range 1-65535 \n " , num_dv_frames ) ;
return false ;
}
if ( num_dv_silent_frames > num_dv_frames ) {
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXStats:num_dv_silent_frames=%d > num_dv_frames=%d \n " , num_dv_silent_frames , num_dv_frames ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXStats:num_dv_silent_frames=%d > num_dv_frames=%d \n " , num_dv_silent_frames , num_dv_frames ) ;
return false ;
}
if ( num_bit_errors > ( 4 * num_dv_frames ) ) { // max 4 bit errors per frame
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXStats:num_bit_errors > (4*num_dv_frames), %d > 4*%d \n " , num_bit_errors , num_dv_frames ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXStats:num_bit_errors > (4*num_dv_frames), %d > 4*%d \n " , num_bit_errors , num_dv_frames ) ;
return false ;
}
if ( myCall . size ( ) ! = 8 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXStats:myCall='%s' len != 8 \n " , myCall . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXStats:myCall='%s' len != 8 \n " , myCall . c_str ( ) ) ;
return false ;
}
if ( myCallExt . size ( ) ! = 4 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXStats:myCallExt='%s' len != 4 \n " , myCallExt . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXStats:myCallExt='%s' len != 4 \n " , myCallExt . c_str ( ) ) ;
return false ;
}
if ( yourCall . size ( ) ! = 8 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXStats:yourCall='%s' len != 8 \n " , yourCall . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXStats:yourCall='%s' len != 8 \n " , yourCall . c_str ( ) ) ;
return false ;
}
if ( rpt1 . size ( ) ! = 8 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXStats:rpt1='%s' len != 8 \n " , rpt1 . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXStats:rpt1='%s' len != 8 \n " , rpt1 . c_str ( ) ) ;
return false ;
}
if ( rpt2 . size ( ) ! = 8 ) {
CLog : : log Info ( " CIRCDDBClient::sendHeardWithTXStats:rpt2='%s' len != 8 \n " , rpt2 . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::sendHeardWithTXStats:rpt2='%s' len != 8 \n " , rpt2 . c_str ( ) ) ;
return false ;
}
@ -245,7 +245,7 @@ bool CIRCDDBClient::sendHeardWithTXStats( const std::string& myCall, const std::
bool CIRCDDBClient : : findGateway ( const std : : string & gatewayCallsign )
{
if ( 8 ! = gatewayCallsign . size ( ) ) {
CLog : : log Info ( " CIRCDDBClient::findGateway:gatewayCallsign='%s' len != 8 \n " , gatewayCallsign . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::findGateway:gatewayCallsign='%s' len != 8 \n " , gatewayCallsign . c_str ( ) ) ;
return false ;
}
std : : string gw ( gatewayCallsign ) ;
@ -257,7 +257,7 @@ bool CIRCDDBClient::findGateway(const std::string& gatewayCallsign)
bool CIRCDDBClient : : findRepeater ( const std : : string & repeaterCallsign )
{
if ( 8 ! = repeaterCallsign . size ( ) ) {
CLog : : log Info ( " CIRCDDBClient::findRepeater:repeaterCallsign='%s' len != 8 \n " , repeaterCallsign . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::findRepeater:repeaterCallsign='%s' len != 8 \n " , repeaterCallsign . c_str ( ) ) ;
return false ;
}
std : : string rptr ( repeaterCallsign ) ;
@ -269,7 +269,7 @@ bool CIRCDDBClient::findRepeater(const std::string& repeaterCallsign)
bool CIRCDDBClient : : findUser ( const std : : string & userCallsign )
{
if ( 8 ! = userCallsign . size ( ) ) {
CLog : : log Info ( " CIRCDDBClient::findUser:userCall='%s' len != 8 \n " , userCallsign . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::findUser:userCall='%s' len != 8 \n " , userCallsign . c_str ( ) ) ;
return false ;
}
std : : string usr ( userCallsign ) ;
@ -292,24 +292,24 @@ bool CIRCDDBClient::receiveRepeater(std::string& repeaterCallsign, std::string&
IRCDDB_RESPONSE_TYPE rt = d - > app - > getReplyMessageType ( ) ;
if ( rt ! = IDRT_REPEATER ) {
CLog : : log Info ( " CIRCDDBClient::receiveRepeater: unexpected response type=%d \n " , rt ) ;
CLog : : log Debug ( " CIRCDDBClient::receiveRepeater: unexpected response type=%d \n " , rt ) ;
return false ;
}
IRCMessage * m = d - > app - > getReplyMessage ( ) ;
if ( m = = NULL ) {
CLog : : log Info ( " CIRCDDBClient::receiveRepeater: no message \n " ) ;
CLog : : log Debug ( " CIRCDDBClient::receiveRepeater: no message \n " ) ;
return false ;
}
if ( m - > getCommand ( ) . compare ( " IDRT_REPEATER " ) ) {
CLog : : log Info ( " CIRCDDBClient::receiveRepeater: wrong message type, expected 'IDRT_REPEATER, got '%s' \n " , m - > getCommand ( ) . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::receiveRepeater: wrong message type, expected 'IDRT_REPEATER, got '%s' \n " , m - > getCommand ( ) . c_str ( ) ) ;
delete m ;
return false ;
}
if ( 3 ! = m - > getParamCount ( ) ) {
CLog : : log Info ( " CIRCDDBClient::receiveRepeater: unexpected number of message parameters, expected 3, got %d \n " , m - > getParamCount ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::receiveRepeater: unexpected number of message parameters, expected 3, got %d \n " , m - > getParamCount ( ) ) ;
delete m ;
return false ;
}
@ -328,25 +328,25 @@ bool CIRCDDBClient::receiveGateway(std::string& gatewayCallsign, std::string& ad
IRCDDB_RESPONSE_TYPE rt = d - > app - > getReplyMessageType ( ) ;
if ( rt ! = IDRT_GATEWAY ) {
CLog : : log Info ( " CIRCDDBClient::receiveGateway: unexpected response type=%d \n " , rt ) ;
CLog : : log Debug ( " CIRCDDBClient::receiveGateway: unexpected response type=%d \n " , rt ) ;
return false ;
}
IRCMessage * m = d - > app - > getReplyMessage ( ) ;
if ( m = = NULL ) {
CLog : : log Info ( " CIRCDDBClient::receiveGateway: no message \n " ) ;
CLog : : log Debug ( " CIRCDDBClient::receiveGateway: no message \n " ) ;
return false ;
}
if ( m - > getCommand ( ) . compare ( " IDRT_GATEWAY " ) ) {
CLog : : log Info ( " CIRCDDBClient::receiveGateway: wrong message type, expected 'IDRT_GATEWAY' got '%s' \n " , m - > getCommand ( ) . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::receiveGateway: wrong message type, expected 'IDRT_GATEWAY' got '%s' \n " , m - > getCommand ( ) . c_str ( ) ) ;
delete m ;
return false ;
}
if ( 2 ! = m - > getParamCount ( ) ) {
CLog : : log Info ( " CIRCDDBClient::receiveGateway: unexpected number of message parameters, expected 2, got %d \n " , m - > getParamCount ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::receiveGateway: unexpected number of message parameters, expected 2, got %d \n " , m - > getParamCount ( ) ) ;
delete m ;
return false ;
}
@ -370,25 +370,25 @@ bool CIRCDDBClient::receiveUser(std::string& userCallsign, std::string& repeater
IRCDDB_RESPONSE_TYPE rt = d - > app - > getReplyMessageType ( ) ;
if ( rt ! = IDRT_USER ) {
CLog : : log Info ( " CIRCDDBClient::receiveUser: unexpected response type=%d \n " , rt ) ;
CLog : : log Debug ( " CIRCDDBClient::receiveUser: unexpected response type=%d \n " , rt ) ;
return false ;
}
IRCMessage * m = d - > app - > getReplyMessage ( ) ;
if ( m = = NULL ) {
CLog : : log Info ( " CIRCDDBClient::receiveUser: no message \n " ) ;
CLog : : log Debug ( " CIRCDDBClient::receiveUser: no message \n " ) ;
return false ;
}
if ( m - > getCommand ( ) . compare ( " IDRT_USER " ) ) {
CLog : : log Info ( " CIRCDDBClient::receiveUser: wrong message type, expected 'IDRT_USER', got '%s' \n " , m - > getCommand ( ) . c_str ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::receiveUser: wrong message type, expected 'IDRT_USER', got '%s' \n " , m - > getCommand ( ) . c_str ( ) ) ;
delete m ;
return false ;
}
if ( 5 ! = m - > getParamCount ( ) ) {
CLog : : log Info ( " CIRCDDBClient::receiveUser: unexpected number of message parameters, expected 5, got %d \n " , m - > getParamCount ( ) ) ;
CLog : : log Debug ( " CIRCDDBClient::receiveUser: unexpected number of message parameters, expected 5, got %d \n " , m - > getParamCount ( ) ) ;
delete m ;
return false ;
}