Changeset 5380

Show
Ignore:
Timestamp:
03/13/08 21:03:55 (4 months ago)
Author:
morris
Message:

More node validation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libwired/trunk/libwired/p7/wi-p7-spec.c

    r5379 r5380  
    763763        root_node = xmlDocGetRootElement(doc); 
    764764         
     765        if(strcmp((const char *) root_node->name, "protocol") != 0) { 
     766                wi_error_set_libwired_p7_error(WI_ERROR_P7_INVALIDSPEC, 
     767                        WI_STR("Expected \"protocol\" node but got \"%s\""), 
     768                        root_node->name); 
     769                 
     770                return false; 
     771        } 
     772 
    765773        p7_spec->name = wi_p7_xml_copy_string_for_attribute(root_node, WI_STR("name")); 
    766774