Signed-off-by: Shi Lei <shi_lei(a)massclouds.com>
---
src/conf/network_conf.c | 4 ++--
src/conf/network_conf.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index a6c2f11a..bb976a78 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -2199,8 +2199,8 @@ virNetworkDNSDefFormat(virBuffer *buf,
}
for (i = 0; i < def->ntxts; i++) {
- virBufferEscapeString(buf, "<txt name='%s' ",
def->txts[i].name);
- virBufferEscapeString(buf, "value='%s'/>\n",
def->txts[i].value);
+ if (virNetworkDNSTxtDefFormatBuf(buf, "txt", &def->txts[i], def,
NULL) < 0)
+ return -1;
}
for (i = 0; i < def->nsrvs; i++) {
diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h
index f5720e5e..a4c83b46 100644
--- a/src/conf/network_conf.h
+++ b/src/conf/network_conf.h
@@ -125,7 +125,7 @@ struct _virNetworkDHCPHostDef {
};
typedef struct _virNetworkDNSTxtDef virNetworkDNSTxtDef;
-struct _virNetworkDNSTxtDef { /* genparse */
+struct _virNetworkDNSTxtDef { /* genparse, genformat */
char *name; /* xmlattr, required */
char *value; /* xmlattr */
};
--
2.25.1