summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-09-07 01:54:01 +0200
committerBjörn Jacke <bj@sernet.de>2010-09-07 20:29:13 +0200
commita63822f5d22e14315099050166c64826f69b46c9 (patch)
treee730bc906731e374a2d195e1d1f51991f4093b32 /source3
parentb428952eefd250d6d4ce77ad89325e9803940d11 (diff)
downloadsamba-a63822f5d22e14315099050166c64826f69b46c9.tar.gz
samba-a63822f5d22e14315099050166c64826f69b46c9.tar.bz2
samba-a63822f5d22e14315099050166c64826f69b46c9.zip
s3/libads: use monotonic clock for DNS timeouts
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/dns.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/libads/dns.c b/source3/libads/dns.c
index 8d23ce1eba..e7d8a40236 100644
--- a/source3/libads/dns.c
+++ b/source3/libads/dns.c
@@ -297,7 +297,7 @@ static NTSTATUS dns_send_req( TALLOC_CTX *ctx, const char *name, int q_type,
int resp_len = NS_PACKETSZ;
static time_t last_dns_check = 0;
static NTSTATUS last_dns_status = NT_STATUS_OK;
- time_t now = time(NULL);
+ time_t now = time_mono(NULL);
/* Try to prevent bursts of DNS lookups if the server is down */
@@ -332,7 +332,7 @@ static NTSTATUS dns_send_req( TALLOC_CTX *ctx, const char *name, int q_type,
DEBUG(0,("ads_dns_lookup_srv: "
"talloc() failed!\n"));
last_dns_status = NT_STATUS_NO_MEMORY;
- last_dns_check = time(NULL);
+ last_dns_check = time_mono(NULL);
return last_dns_status;
}
}
@@ -351,7 +351,7 @@ static NTSTATUS dns_send_req( TALLOC_CTX *ctx, const char *name, int q_type,
if (errno == ECONNREFUSED) {
last_dns_status = NT_STATUS_CONNECTION_REFUSED;
}
- last_dns_check = time(NULL);
+ last_dns_check = time_mono(NULL);
return last_dns_status;
}
@@ -365,7 +365,7 @@ static NTSTATUS dns_send_req( TALLOC_CTX *ctx, const char *name, int q_type,
name));
TALLOC_FREE( buffer );
last_dns_status = NT_STATUS_BUFFER_TOO_SMALL;
- last_dns_check = time(NULL);
+ last_dns_check = time_mono(NULL);
return last_dns_status;
}
@@ -378,7 +378,7 @@ static NTSTATUS dns_send_req( TALLOC_CTX *ctx, const char *name, int q_type,
*buf = buffer;
*resp_length = resp_len;
- last_dns_check = time(NULL);
+ last_dns_check = time_mono(NULL);
last_dns_status = NT_STATUS_OK;
return last_dns_status;
}