r18598: Add marshalling support to smb_io_time.
authorVolker Lendecke <vlendec@samba.org>
Sun, 17 Sep 2006 20:28:46 +0000 (20:28 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:51:59 +0000 (11:51 -0500)
Volker

source/rpc_parse/parse_misc.c

index ef4d0e768992b665f81b9d0f5c7eae154dac0f14..cd2aabd056686789316683fb21f32c614611824d 100644 (file)
@@ -124,13 +124,20 @@ BOOL smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth)
 
        if(!prs_align(ps))
                return False;
+
+       if (MARSHALLING(ps)) {
+               low = *nttime & 0xFFFFFFFF;
+               high = *nttime >> 32;
+       }
        
        if(!prs_uint32("low ", ps, depth, &low)) /* low part */
                return False;
        if(!prs_uint32("high", ps, depth, &high)) /* high part */
                return False;
 
-       *nttime = (((uint64_t)high << 32) + low);
+       if (UNMARSHALLING(ps)) {
+               *nttime = (((uint64_t)high << 32) + low);
+       }
 
        return True;
 }