dplus names must be 8 chars long!

lastudp
Tom Early 7 years ago
parent e9645fad82
commit 3c25355faa

@ -124,6 +124,7 @@ bool CDPlusAuthenticator::authenticate(const std::string &callsign, const std::s
Trim(address);
Trim(name);
name.resize(8, ' ');
// Get the active flag
bool active = (buffer[i + 25U] & 0x80U) == 0x80U;
@ -141,7 +142,7 @@ bool CDPlusAuthenticator::authenticate(const std::string &callsign, const std::s
}
printf("Authorized DPlus with %s using callsign %s\n", hostname.c_str(), callsign.c_str());
printf("Added %ld DPlus gateways\n", gwy_map.size());
printf("Added %d DPlus gateways\n", (int)gwy_map.size());
socket.close();
delete[] buffer;

@ -402,14 +402,14 @@ bool CQnetLink::load_gwys(const std::string &filename)
sprintf(payload, "%s %s", host, port);
auto gwy_pos = gwy_list.find(call);
if (gwy_pos == gwy_list.end())
printf("Added Call=[%s], payload=[%s]\n",call, payload);
else
if (gwy_pos != gwy_list.end())
printf("%s %s has been redefined!\n", call, payload);
gwy_list[call] = payload;
}
fclose(fp);
for (auto it=gwy_list.begin(); it!=gwy_list.end(); it++)
printf("%s %s\n", it->first.c_str(), it->second.c_str());
printf("Added %d gateways\n", (int)gwy_list.size());
return true;
}

Loading…
Cancel
Save

Powered by TurnKey Linux.