git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b428952
)
s3/libads: use monotonic clock for DNS timeouts
author
Björn Jacke
<bj@sernet.de>
Mon, 6 Sep 2010 23:54:01 +0000
(
01:54
+0200)
committer
Björn Jacke
<bj@sernet.de>
Tue, 7 Sep 2010 18:29:13 +0000
(20:29 +0200)
source3/libads/dns.c
patch
|
blob
|
history
diff --git
a/source3/libads/dns.c
b/source3/libads/dns.c
index 8d23ce1eba8a22fad8483ff8e8d5caea57196e69..e7d8a40236b29f5e5ec136c97343fa7d2f0be92b 100644
(file)
--- 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;
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 */
/* 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;
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;
}
}
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;
}
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;
}
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;
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;
}
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;
*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;
}
last_dns_status = NT_STATUS_OK;
return last_dns_status;
}