mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-23 17:17:38 +00:00
lxip/lwip tests: non-libc attributes to config tag
The 'server_ip' and 'server_port' attributes for 'lxip/udp_client' and 'lwip/http_clnt' as well as the 'port' attribute for 'lxip/udp_echo' and 'lwip/http_srv_static' are not directly libc-related so they should not live in the libc tag but in the config tag of the component. Ref #2193
This commit is contained in:
committed by
Christian Helmuth
parent
a9535d5311
commit
959b80bab1
@ -90,8 +90,9 @@ int main()
|
||||
|
||||
enum { ADDR_STR_SZ = 16 };
|
||||
char serv_addr[ADDR_STR_SZ] = { 0 };
|
||||
Xml_node libc_node = config()->xml_node().sub_node("libc");
|
||||
try { libc_node.attribute("server_ip").value(serv_addr, ADDR_STR_SZ); }
|
||||
Xml_node config_node = config()->xml_node();
|
||||
Xml_node libc_node = config_node.sub_node("libc");
|
||||
try { config_node.attribute("server_ip").value(serv_addr, ADDR_STR_SZ); }
|
||||
catch(...) {
|
||||
error("Missing \"server_ip\" attribute.");
|
||||
throw Xml_node::Nonexistent_attribute();
|
||||
@ -124,9 +125,9 @@ int main()
|
||||
log("Connect to server ...");
|
||||
|
||||
unsigned port = 0;
|
||||
try { libc_node.attribute("http_port").value(&port); }
|
||||
try { config_node.attribute("server_port").value(&port); }
|
||||
catch (...) {
|
||||
error("Missing \"http_port\" attribute.");
|
||||
error("Missing \"server_port\" attribute.");
|
||||
throw Xml_node::Nonexistent_attribute();
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,8 @@ int main()
|
||||
uint32_t gw = 0;
|
||||
unsigned port = 0;
|
||||
|
||||
Xml_node libc_node = config()->xml_node().sub_node("libc");
|
||||
Xml_node config_node = config()->xml_node();
|
||||
Xml_node libc_node = config_node.sub_node("libc");
|
||||
String<ADDR_STR_SZ> ip_addr_str =
|
||||
read_string_attribute<ADDR_STR_SZ>(libc_node, "ip_addr", String<ADDR_STR_SZ>());
|
||||
String<ADDR_STR_SZ> netmask_str =
|
||||
@ -122,9 +123,9 @@ int main()
|
||||
String<ADDR_STR_SZ> gateway_str =
|
||||
read_string_attribute<ADDR_STR_SZ>(libc_node, "gateway", String<ADDR_STR_SZ>());
|
||||
|
||||
try { libc_node.attribute("http_port").value(&port); }
|
||||
try { config_node.attribute("port").value(&port); }
|
||||
catch(...) {
|
||||
error("Missing \"http_port\" attribute.");
|
||||
error("Missing \"port\" attribute.");
|
||||
throw Xml_node::Nonexistent_attribute();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user