mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 09:46:20 +00:00
test/lwip/udp/client: handle missing attributes
Print a useful message if a manadatory config attribute is missing and exit. Issue #2751
This commit is contained in:
parent
7adc7bc01a
commit
6ec8824d75
@ -49,10 +49,13 @@ void Libc::Component::construct(Libc::Env &env)
|
||||
Xml_node config_node = config.xml();
|
||||
try { config_node.attribute("server_ip").value(&serv_addr); }
|
||||
catch (...) {
|
||||
error("cannot read attribute 'server_ip'");
|
||||
break;
|
||||
}
|
||||
try { config_node.attribute("server_port").value(&port); }
|
||||
catch (...) {
|
||||
continue;
|
||||
error("cannot read attribute 'server_port'");
|
||||
break;
|
||||
}
|
||||
/* create server socket address */
|
||||
struct sockaddr_in addr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user