summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-02-22 18:44:14 +0100
committerStephen Gallagher <sgallagh@redhat.com>2012-02-23 09:13:21 -0500
commite8dd8c81dacbe4b9c0de3fc0f9777bfc6e13bc41 (patch)
tree0b102e88c1433e89b056ec8ff21dc34053ca93b9
parent8d821f0508f495deb376617c165cbcbf396a058a (diff)
downloadsssd-e8dd8c81dacbe4b9c0de3fc0f9777bfc6e13bc41.tar.gz
sssd-e8dd8c81dacbe4b9c0de3fc0f9777bfc6e13bc41.tar.bz2
sssd-e8dd8c81dacbe4b9c0de3fc0f9777bfc6e13bc41.zip
Save errno value before calling DEBUG
-rw-r--r--src/providers/ipa/ipa_dyndns.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/providers/ipa/ipa_dyndns.c b/src/providers/ipa/ipa_dyndns.c
index 1e4d97ed..089f8fba 100644
--- a/src/providers/ipa/ipa_dyndns.c
+++ b/src/providers/ipa/ipa_dyndns.c
@@ -344,10 +344,12 @@ static int ipa_dyndns_add_ldap_iface(struct ipa_dyndns_ctx *state,
return ret;
}
+ errno = 0;
ret = getsockname(fd, (struct sockaddr *) &ss, &ss_len);
if (ret == -1) {
- DEBUG(0,("Failed to get socket name\n"));
- return errno;
+ ret = errno;
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to get socket name\n"));
+ return ret;
}
switch(ss.ss_family) {