Author: jerry
Date: 2005-03-17 15:50:47 +0000 (Thu, 17 Mar 2005)
New Revision: 5855

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5855

Log:
fix (my) build breakage.  Sorry
Modified:
   trunk/source/rpc_parse/parse_reg.c


Changeset:
Modified: trunk/source/rpc_parse/parse_reg.c
===================================================================
--- trunk/source/rpc_parse/parse_reg.c  2005-03-17 14:32:52 UTC (rev 5854)
+++ trunk/source/rpc_parse/parse_reg.c  2005-03-17 15:50:47 UTC (rev 5855)
@@ -1599,12 +1599,11 @@
 void init_reg_q_shutdown(REG_Q_SHUTDOWN * q_s, const char *msg,
                        uint32 timeout, BOOL do_reboot, BOOL force)
 {
-       q_s->ptr_0 = 1;
-       q_s->ptr_1 = 1;
-       q_s->ptr_2 = 1;
+       q_s->server = TALLOC_P( get_talloc_ctx(), uint16 );
+       *q_s->server = 0x1;
 
-       init_unistr2(&q_s->uni_msg, msg, UNI_FLAGS_NONE);
-       init_uni_hdr(&q_s->hdr_msg, &q_s->uni_msg);
+       q_s->message = TALLOC_P( get_talloc_ctx(), UNISTR4 );
+       init_unistr4( q_s->message, msg, UNI_FLAGS_NONE );
 
        q_s->timeout = timeout;
 
@@ -1613,6 +1612,30 @@
 }
 
 /*******************************************************************
+Inits a REG_Q_SHUTDOWN_EX structure.
+********************************************************************/
+
+void init_reg_q_shutdown_ex(REG_Q_SHUTDOWN_EX * q_u_ex, const char *msg,
+                       uint32 timeout, BOOL do_reboot, BOOL force, uint32 
reason)
+{
+       REG_Q_SHUTDOWN q_u;
+       
+       ZERO_STRUCT( q_u );
+       
+       init_reg_q_shutdown( &q_u, msg, timeout, do_reboot, force );
+       
+       /* steal memory */
+       
+       q_u_ex->server  = q_u.server;
+       q_u_ex->message = q_u.message;
+       
+       q_u_ex->reboot  = q_u.reboot;
+       q_u_ex->force   = q_u.force;
+       
+       q_u_ex->reason = reason;
+}
+
+/*******************************************************************
 reads or writes a structure.
 ********************************************************************/
 
@@ -1628,27 +1651,24 @@
        if (!prs_align(ps))
                return False;
 
-       if (!prs_uint32("ptr_0", ps, depth, &(q_s->ptr_0)))
+       if (!prs_uint16_p("server", ps, depth, &q_s->server))
                return False;
-       if (!prs_uint32("ptr_1", ps, depth, &(q_s->ptr_1)))
-               return False;
-       if (!prs_uint32("ptr_2", ps, depth, &(q_s->ptr_2)))
-               return False;
 
-       if (!smb_io_unihdr("hdr_msg", &(q_s->hdr_msg), ps, depth))
+       if (!prs_unistr4_p("message", &q_s->message, ps, depth))
                return False;
-       if (!smb_io_unistr2("uni_msg", &(q_s->uni_msg), q_s->hdr_msg.buffer, 
ps, depth))
-               return False;
+
        if (!prs_align(ps))
                return False;
 
        if (!prs_uint32("timeout", ps, depth, &(q_s->timeout)))
                return False;
+
        if (!prs_uint8("force  ", ps, depth, &(q_s->force)))
                return False;
        if (!prs_uint8("reboot ", ps, depth, &(q_s->reboot)))
                return False;
 
+
        return True;
 }
 
@@ -1674,27 +1694,6 @@
 }
 
 /*******************************************************************
-Inits a REG_Q_SHUTDOWN_EX structure.
-********************************************************************/
-
-void init_reg_q_shutdown_ex(REG_Q_SHUTDOWN_EX * q_s, const char *msg,
-                       uint32 timeout, BOOL do_reboot, BOOL force, uint32 
reason)
-{
-       
-       q_s->server = TALLOC_P( get_talloc_ctx(), uint16 );
-       *q_s->server = 0x1;
-
-       q_s->message = TALLOC_P( get_talloc_ctx(), UNISTR4 );
-       init_unistr4( q_s->message, msg, UNI_FLAGS_NONE );
-
-       q_s->timeout = timeout;
-
-       q_s->reboot = do_reboot ? 1 : 0;
-       q_s->force = force ? 1 : 0;
-       q_s->reason = reason;
-}
-
-/*******************************************************************
 reads or writes a REG_Q_SHUTDOWN_EX structure.
 ********************************************************************/
 

Reply via email to