aboutsummaryrefslogtreecommitdiff
path: root/sys/netsmb
diff options
context:
space:
mode:
authorChristian Brueffer <brueffer@FreeBSD.org>2012-07-10 21:02:59 +0000
committerChristian Brueffer <brueffer@FreeBSD.org>2012-07-10 21:02:59 +0000
commit08bd45d371b60f7d863108b49d4ae6d592d283a3 (patch)
treed38c82f22959399bf37dc25d6d5c851c95f6a819 /sys/netsmb
parentbf7a35de2ddc21122a13d13a0d30e7cbedadadb3 (diff)
downloadsrc-08bd45d371b60f7d863108b49d4ae6d592d283a3.tar.gz
src-08bd45d371b60f7d863108b49d4ae6d592d283a3.zip
Change a duplicated check to clarify that we really want to set a
reasonable default timeout. PR: 163135 Submitted by: Sascha Wildner <saw@online.de> Suggested by: bp Reviewed by: bp
Notes
Notes: svn path=/head/; revision=238356
Diffstat (limited to 'sys/netsmb')
-rw-r--r--sys/netsmb/smb_trantcp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netsmb/smb_trantcp.c b/sys/netsmb/smb_trantcp.c
index c8984510bf7c..ce52544da62c 100644
--- a/sys/netsmb/smb_trantcp.c
+++ b/sys/netsmb/smb_trantcp.c
@@ -523,8 +523,10 @@ smb_nbst_connect(struct smb_vc *vcp, struct sockaddr *sap, struct thread *td)
return error;
getnanotime(&ts2);
timespecsub(&ts2, &ts1);
- if (ts2.tv_sec == 0 && ts2.tv_sec == 0)
+ if (ts2.tv_sec == 0) {
ts2.tv_sec = 1;
+ ts2.tv_nsec = 0;
+ }
nbp->nbp_timo = ts2;
timespecadd(&nbp->nbp_timo, &ts2);
timespecadd(&nbp->nbp_timo, &ts2);