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
This commit is contained in:
Christian Brueffer 2012-07-10 21:02:59 +00:00
parent bf7a35de2d
commit 08bd45d371

View File

@ -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);