mirror of
https://github.com/bgp/bgpq4
synced 2025-02-28 08:53:11 +00:00
First of all, identify the client
This commit is contained in:
@@ -827,6 +827,13 @@ bgpq_expand(struct bgpq_expander* b)
|
||||
exit(1);
|
||||
};
|
||||
|
||||
if(b->identify) {
|
||||
char ident[128];
|
||||
snprintf(ident,sizeof(ident),"!n" PACKAGE_STRING "\n");
|
||||
write(fd, ident, strlen(ident));
|
||||
read(fd, ident, sizeof(ident));
|
||||
};
|
||||
|
||||
if(b->sources && b->sources[0]!=0) {
|
||||
int slen = strlen(b->sources)+4;
|
||||
if (slen < 128)
|
||||
@@ -845,13 +852,6 @@ bgpq_expand(struct bgpq_expander* b)
|
||||
};
|
||||
};
|
||||
|
||||
if(b->identify) {
|
||||
char ident[128];
|
||||
snprintf(ident,sizeof(ident),"!n" PACKAGE_STRING "\n");
|
||||
write(fd, ident, strlen(ident));
|
||||
read(fd, ident, sizeof(ident));
|
||||
};
|
||||
|
||||
if (pipelining)
|
||||
fcntl(fd, F_SETFL, O_NONBLOCK|(fcntl(fd, F_GETFL)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user