summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_processlogon.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-06-01 11:21:15 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-06-01 10:38:47 +0200
commit56e72337b01216dc7cba418f040a5cc928e5fc6f (patch)
tree7d64feee26bfeede2ab07ea6045ac11ebb4ea3c2 /source3/nmbd/nmbd_processlogon.c
parent9bd695c83f43cacfc08566f3c18db44b61f7ed75 (diff)
downloadsamba-56e72337b01216dc7cba418f040a5cc928e5fc6f.tar.gz
samba-56e72337b01216dc7cba418f040a5cc928e5fc6f.tar.bz2
samba-56e72337b01216dc7cba418f040a5cc928e5fc6f.zip
lib/util/time.c: timeval_current_ofs_msec
Several places want "milliseconds from current time", and several were simply doing "msec * 1000" which can (and does in one place) result in a usec value over 1 a million. Using a helper to do this is safer and more readable. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'source3/nmbd/nmbd_processlogon.c')
-rw-r--r--source3/nmbd/nmbd_processlogon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c
index 790e1c3ce1..25cdcc6970 100644
--- a/source3/nmbd/nmbd_processlogon.c
+++ b/source3/nmbd/nmbd_processlogon.c
@@ -604,8 +604,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) ));
source_name, source_addr,
lp_init_logon_delay()));
- when = timeval_current_ofs(0,
- lp_init_logon_delay() * 1000);
+ when = timeval_current_ofs_msec(lp_init_logon_delay());
p->locked = true;
event_add_timed(nmbd_event_context(),
NULL,