Commit f28e0bae authored by Gary Wong's avatar Gary Wong

Checkpoint changes to assign (mostly rspec parsing stuff).

parent cd10006d
......@@ -4,7 +4,7 @@
* All rights reserved.
*/
static const char rcsid[] = "$Id: annotate_rspec.cc,v 1.4 2009-07-19 20:47:08 gtw Exp $";
static const char rcsid[] = "$Id: annotate_rspec.cc,v 1.5 2009-07-20 15:36:21 gtw Exp $";
#ifdef WITH_XML
......@@ -91,6 +91,16 @@ void annotate_rspec::annotate_element (const char* v_name, list<const char*>* li
prev_component_hop = create_component_hop (p_switch_switch_link, vlink, NEITHER, prev_component_hop);
prev_link_in_path = p_switch_switch_link;
}
#else
{
static int gave_apology;
if( !gave_apology ) {
gave_apology = 1;
cout << "Warning: unable to locate interfaces on "
"switch/switch links; omitting those\n";
}
}
#endif
create_component_hop (p_switch_dst_link, vlink, DESTINATION, prev_component_hop);
}
......
......@@ -8,7 +8,7 @@
* XML Parser for RSpec ptop files
*/
static const char rcsid[] = "$Id: parse_request_rspec.cc,v 1.11 2009-07-20 08:14:00 ricci Exp $";
static const char rcsid[] = "$Id: parse_request_rspec.cc,v 1.12 2009-07-20 15:36:21 gtw Exp $";
#ifdef WITH_XML
......@@ -384,11 +384,23 @@ bool populate_nodes_rspec(DOMElement *root, tb_vgraph &vg) {
"exclusive" ).x() ) );
fstring desirename( "shared" );
if( !strcmp( exclusive, "false" ) ) {
if( !strcmp( exclusive, "false" ) ||
!strcmp( exclusive, "0" ) ) {
tb_node_featuredesire node_fd( desirename, 1.0,
true, featuredesire::FD_TYPE_NORMAL);
node_fd.add_desire_user( 1.0 );
v->desires.push_front( node_fd );
} else if( strcmp( exclusive, "true" ) &&
strcmp( exclusive, "1" ) ) {
static int syntax_error;
if( !syntax_error ) {
syntax_error = 1;
cout << "Warning: unrecognised exclusive "
"attribute \"" << exclusive << "\"; will "
"assume exclusive=\"true\"\n";
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment