1
0
mirror of https://github.com/bgp/bgpq4.git synced 2024-05-11 05:55:05 +00:00

bugfix: shall check reply code for !s sources command too..

This commit is contained in:
Alexandre Snarskii
2015-06-26 18:34:57 +03:00
parent c32b569437
commit c88911f335
2 changed files with 9 additions and 1 deletions

View File

@@ -390,7 +390,7 @@ bgpq_pipeline(FILE* f, int (*callback)(char*, void*), void* udata,
};
};
SX_DEBUG(debug_expander,"expander: sending '%s' (queued %i of %i)\n",
SX_DEBUG(debug_expander,"expander: sending '%s' (queued %i of %i)\n",
request, d->qsize, d->socksize);
bp=malloc(sizeof(struct bgpq_prequest));
@@ -668,6 +668,11 @@ bgpq_expand(struct bgpq_expander* b)
snprintf(sources,sizeof(sources),"!s%s\n", b->sources);
fwrite(sources,strlen(sources),1,f);
fgets(sources,sizeof(sources),f);
if(sources[0]!='C') {
sx_report(SX_ERROR, "Invalid sources '%s': %s\n", b->sources,
sources);
exit(1);
};
};
if(b->identify) {