提交 c93370c4 编写于 作者: L Laine Stump 提交者: Daniel Veillard

Maintain value of ctxt->node in virInterfaceDefParseDhcp

* src/conf/interface_conf.c: This was causing subsequent calls to
  virXPathxxx() to fail, since ctxt->node was left pointing at the
  dhcp node, rather than the protocol node.
上级 237f3bf8
......@@ -227,10 +227,12 @@ virInterfaceDefParseBondArpValid(virConnectPtr conn, xmlXPathContextPtr ctxt) {
static int
virInterfaceDefParseDhcp(virConnectPtr conn, virInterfaceDefPtr def,
xmlNodePtr dhcp, xmlXPathContextPtr ctxt) {
xmlNodePtr save;
char *tmp;
int ret = 0;
def->proto.dhcp = 1;
save = ctxt->node;
ctxt->node = dhcp;
/* Not much to do in the current version */
tmp = virXPathString(conn, "string(./@peerdns)", ctxt);
......@@ -248,6 +250,7 @@ virInterfaceDefParseDhcp(virConnectPtr conn, virInterfaceDefPtr def,
} else
def->proto.peerdns = -1;
ctxt->node = save;
return(ret);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册