提交 757b94c6 编写于 作者: M Michal Privoznik

libvirt_nss: Pass @name to appendAddr()

In the nss plugin we have ERROR() macro which by default does
nothing. However, at compile time it can be made to report errors
(this is useful for debugging because by nature of NSS debugging
is hard). Anyway, the appendAddr() function uses @name (which
contains name the caller wants us to resolve) for error
reporting. But the caller findLeaseInJSON() is not passing it.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 a532bf64
...@@ -80,7 +80,8 @@ typedef struct { ...@@ -80,7 +80,8 @@ typedef struct {
static int static int
appendAddr(leaseAddress **tmpAddress, appendAddr(const char *name ATTRIBUTE_UNUSED,
leaseAddress **tmpAddress,
size_t *ntmpAddress, size_t *ntmpAddress,
virJSONValuePtr lease, virJSONValuePtr lease,
int af) int af)
...@@ -196,7 +197,7 @@ findLeaseInJSON(leaseAddress **tmpAddress, ...@@ -196,7 +197,7 @@ findLeaseInJSON(leaseAddress **tmpAddress,
DEBUG("Found record for %s", name); DEBUG("Found record for %s", name);
*found = true; *found = true;
if (appendAddr(tmpAddress, ntmpAddress, lease, af) < 0) if (appendAddr(name, tmpAddress, ntmpAddress, lease, af) < 0)
return -1; return -1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册