Skip to content

Commit

Permalink
now it compiles! (but it's still just a workaround)
Browse files Browse the repository at this point in the history
  • Loading branch information
nova77 committed Apr 18, 2009
1 parent 6d6081d commit 1988402
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions resolvers/lan/lan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ lan::handle_receive_from(const boost::system::error_code& error,
}
//cout << "lan: Got udp response." <<endl;
ri_ptr rip;

// TEMP!
typedef std::pair< json_spirit::Object, ss_ptr > result_pair;
vector< result_pair > final_results;

try
{
rip = m_pap->ri_from_json(resobj);
Expand All @@ -256,18 +261,21 @@ lan::handle_receive_from(const boost::system::error_code& error,
url += "/sid/";
url += rip->id();
boost::shared_ptr<StreamingStrategy>
s(new CurlStreamingStrategy(url));
pip->set_streaming_strategy(s);
ss(new CurlStreamingStrategy(url));
pip->set_streaming_strategy(ss); // pointless?

// TEMP!
final_results.push_back( result_pair(pip->get_json(), ss) );
}
}
catch (...)
{
cout << "lan: Missing fields in response json, discarding" << endl;
break;
}
vector< ri_ptr > v;
v.push_back(rip);
report_results(qid, v, name());
if ( !final_results.empty() )
m_pap->report_results( qid, final_results );
//report_results(qid, v, name());
cout << "INFO Result from '" << rip->source()
<<"' for '"<< write_formatted( rip->get_json())
<< endl;
Expand Down

0 comments on commit 1988402

Please sign in to comment.