[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-2930-g8c87a43

Jeremy Allison jra at samba.org
Fri Jun 20 20:25:02 GMT 2008


The branch, v3-3-test has been updated
       via  8c87a4319cc83f55fb105cae81a8efbc3fb5b98b (commit)
      from  96325ff44dc404a68d4ebd423cf78210ec3ff902 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit 8c87a4319cc83f55fb105cae81a8efbc3fb5b98b
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Jun 20 13:23:31 2008 -0700

    Fix bug #5531 - fix conversion of ns units when converting from nttime to timespec.
    Fix from hkurma at datadomain.com.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/lib/time.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/time.c b/source/lib/time.c
index e5fd929..17990b9 100644
--- a/source/lib/time.c
+++ b/source/lib/time.c
@@ -1211,8 +1211,12 @@ struct timespec nt_time_to_unix_timespec(NTTIME *nt)
 	d = (int64)*nt;
 	/* d is now in 100ns units, since jan 1st 1601".
 	   Save off the ns fraction. */
-	
-	ret.tv_nsec = (long) ((d % 100) * 100);
+
+	/*
+	 * Take the last seven decimal digits and multiply by 100.
+	 * to convert from 100ns units to 1ns units.
+	 */
+        ret.tv_nsec = (long) ((d % (1000 * 1000 * 10)) * 100);
 
 	/* Convert to seconds */
 	d /= 1000*1000*10;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list