static const regex r("^--([a-z0-9-]*)=(.*)$");
match_results<string::const_iterator> res;
if(!regex_match(s,res,r))
- throw argument_exception("does not match");
+ throw argument_exception("argument item does not match, should be --var=val");
string var(res[1].first, res[1].second);
string val(res[2].first, res[2].second);
void QGen::start()
{
+
while(fillAndSendQuestions()) {
printStats();
processAnswers();
while(waitForData(d_clientsock, first ? 1 : 0) > 0) {
first=false;
len=recvfrom(d_clientsock, reinterpret_cast<char *>(buf), sizeof(buf)-1,0,(struct sockaddr*)(&fromaddr), &addrlen);
+
DNSPacket p;
vector<DNSResourceRecord> answers;
try {
continue;
}
-
-
OutstandingQuestion oq;
oq.qname=p.qdomain;
oq.id=p.d.id;
cout<<"\n";
}
- if(!gotOne)
- cout<<p.qdomain<<" "<<p.qtype.getName()<<" NO RECORD"<<endl;
+ // if(!gotOne)
+ // cout<<p.qdomain<<" "<<p.qtype.getName()<<" NO RECORD"<<endl;
d_answeredOK++;
d_questions.erase(i);
at.add("timeout",Numeric(),"30");
at.parse(argc, argv);
at.constraints();
+ arg().set("no-shuffle","Don't change")="off";
string fileName=at.get("questions");
string server=at.get("server");
{
cerr<<"Fatal: "<<e.what()<<endl;
}
+/*
catch(...)
{
- cerr<<"Caught something??"<<endl;
+ cerr<<"Unknown fatal exception"<<endl;
}
+*/