check for valid link callsign first

pull/14/head
Tom Early 6 years ago
parent 065a464bbd
commit be905df09c

@ -688,6 +688,14 @@ void CQnetLink::g2link(const char from_mod, const char *call, const char to_mod)
to_remote_g2[i].cs[0] = '\0';
to_remote_g2[i].to_mod = '\0';
std::string address;
unsigned short port;
if (qnDB.FindGW(call, address, port)) {
sprintf(notify_msg[i], "%c_gatewaynotfound.dat_GATEWAY_NOT_FOUND", from_mod);
printf("%s not found in gwy list\n", call);
return;
}
strcpy(to_remote_g2[i].cs, call);
to_remote_g2[i].to_mod = to_mod;
@ -708,14 +716,6 @@ void CQnetLink::g2link(const char from_mod, const char *call, const char to_mod)
}
}
std::string address;
unsigned short port;
if (qnDB.FindGW(call, address, port)) {
sprintf(notify_msg[i], "%c_gatewaynotfound.dat_GATEWAY_NOT_FOUND", from_mod);
printf("%s not found in gwy list\n", call);
return;
}
if (address.size()) {
ok = resolve_rmt(address.c_str(), port, to_remote_g2[i].addr);
if (!ok) {

Loading…
Cancel
Save

Powered by TurnKey Linux.