s3-rpc_parse: move prs_uint64 to rpc_parse/parse_prs.c.
authorGünther Deschner <gd@samba.org>
Wed, 18 Mar 2009 14:05:44 +0000 (15:05 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 18 Mar 2009 15:43:28 +0000 (16:43 +0100)
Guenther

source3/include/proto.h
source3/rpc_parse/parse_misc.c
source3/rpc_parse/parse_prs.c

index 1c2abc6017c5686191c6d1060272ae3da6162092..5019cb6b9d6792ec36c6f3636c72afea46972e9d 100644 (file)
@@ -5698,7 +5698,6 @@ bool smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *
 bool smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int depth);
 void init_unistr3(UNISTR3 *str, const char *buf);
 bool smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int depth);
-bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64);
 uint32 str_len_uni(UNISTR *source);
 bool policy_handle_is_valid(const POLICY_HND *hnd);
 
@@ -5748,6 +5747,7 @@ bool prs_pointer( const char *name, prs_struct *ps, int depth,
 bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16);
 bool prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32);
 bool prs_int32(const char *name, prs_struct *ps, int depth, int32 *data32);
+bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64);
 bool prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS *status);
 bool prs_dcerpc_status(const char *name, prs_struct *ps, int depth, NTSTATUS *status);
 bool prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status);
index e948afde87b3c858f43c77b7378dea6e7fce16ee..d966790249ba373cf5b60f06c2d8e44fdaa8581c 100644 (file)
@@ -631,30 +631,6 @@ bool smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int depth)
        return True;
 }
 
-/*******************************************************************
- Stream a uint64_struct
- ********************************************************************/
-bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64)
-{
-       if (UNMARSHALLING(ps)) {
-               uint32 high, low;
-
-               if (!prs_uint32(name, ps, depth+1, &low))
-                       return False;
-
-               if (!prs_uint32(name, ps, depth+1, &high))
-                       return False;
-
-               *data64 = ((uint64_t)high << 32) + low;
-
-               return True;
-       } else {
-               uint32 high = (*data64) >> 32, low = (*data64) & 0xFFFFFFFF;
-               return prs_uint32(name, ps, depth+1, &low) && 
-                          prs_uint32(name, ps, depth+1, &high);
-       }
-}
-
 /*******************************************************************
 return the length of a UNISTR string.
 ********************************************************************/  
index bc9202ccccfd605317e33ec2cda6f8886b44f555..c42018947ff33c4a0a62991c6ed4a6f2cb4bb163 100644 (file)
@@ -759,6 +759,30 @@ bool prs_int32(const char *name, prs_struct *ps, int depth, int32 *data32)
        return True;
 }
 
+/*******************************************************************
+ Stream a uint64_struct
+ ********************************************************************/
+bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64)
+{
+       if (UNMARSHALLING(ps)) {
+               uint32 high, low;
+
+               if (!prs_uint32(name, ps, depth+1, &low))
+                       return False;
+
+               if (!prs_uint32(name, ps, depth+1, &high))
+                       return False;
+
+               *data64 = ((uint64_t)high << 32) + low;
+
+               return True;
+       } else {
+               uint32 high = (*data64) >> 32, low = (*data64) & 0xFFFFFFFF;
+               return prs_uint32(name, ps, depth+1, &low) &&
+                          prs_uint32(name, ps, depth+1, &high);
+       }
+}
+
 /*******************************************************************
  Stream a NTSTATUS
  ********************************************************************/