From c93370c4ad4d9be30457795cf829c204211baf64 Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Tue, 29 Sep 2009 11:16:04 +0200 Subject: [PATCH] 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. --- src/conf/interface_conf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index 96e0710a82..e646351f04 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -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); } -- GitLab