Added duplicate remote check
This commit is contained in:
parent
967e801857
commit
fd276b8392
@ -605,6 +605,7 @@ void check_servers(void)
|
|||||||
char *errmsg, scfgfn[PATH_MAX];
|
char *errmsg, scfgfn[PATH_MAX];
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
ncs_list *tnsl, **tmp;
|
ncs_list *tnsl, **tmp;
|
||||||
|
srv_list *srv;
|
||||||
int j, inlist, Remove;
|
int j, inlist, Remove;
|
||||||
int a1, a2, a3, a4;
|
int a1, a2, a3, a4;
|
||||||
struct servent *se;
|
struct servent *se;
|
||||||
@ -636,6 +637,13 @@ void check_servers(void)
|
|||||||
inlist = TRUE;
|
inlist = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (srv = servers; srv; srv = srv->next) {
|
||||||
|
if (strcmp(srv->server, ibcsrv.server) == 0) {
|
||||||
|
inlist = TRUE;
|
||||||
|
Syslog('+', "IBC: can't add new configured server %s: already connected via %s",
|
||||||
|
ibcsrv.server, srv->router);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!inlist ) {
|
if (!inlist ) {
|
||||||
fill_ncslist(&ncsl, ibcsrv.server, ibcsrv.myname, ibcsrv.passwd, ibcsrv.Dyndns);
|
fill_ncslist(&ncsl, ibcsrv.server, ibcsrv.myname, ibcsrv.passwd, ibcsrv.Dyndns);
|
||||||
srvchg = TRUE;
|
srvchg = TRUE;
|
||||||
|
Reference in New Issue
Block a user