diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-01-18 10:18:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:17:16 -0500 |
commit | 0596badb410a58e7a715e2b17bc0bef0489a2448 (patch) | |
tree | 79330d84291c126bc76b8fb2ff5e8de0059afb7f /source/rpc_server/srv_initshutdown_nt.c | |
parent | 6a13e878b5d299cb3b3d7cb33ee0d51089d9228d (diff) | |
download | samba-0596badb410a58e7a715e2b17bc0bef0489a2448.tar.gz samba-0596badb410a58e7a715e2b17bc0bef0489a2448.tar.xz samba-0596badb410a58e7a715e2b17bc0bef0489a2448.zip |
r20875: Pass DCE/RPC server call arguments as a struct rather than as separate arguments.
This makes it a bit more similar to the Samba4 code.
Diffstat (limited to 'source/rpc_server/srv_initshutdown_nt.c')
-rw-r--r-- | source/rpc_server/srv_initshutdown_nt.c | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/source/rpc_server/srv_initshutdown_nt.c b/source/rpc_server/srv_initshutdown_nt.c index a73077fe03e..cd84f720585 100644 --- a/source/rpc_server/srv_initshutdown_nt.c +++ b/source/rpc_server/srv_initshutdown_nt.c @@ -30,24 +30,37 @@ /******************************************************************* ********************************************************************/ -WERROR _initshutdown_Init(pipes_struct *p, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot) +WERROR _initshutdown_Init(pipes_struct *p, struct initshutdown_Init *r) { - uint32_t reason = 0; + struct winreg_InitiateSystemShutdownEx s; + + s.in.hostname = r->in.hostname; + s.in.message = r->in.message; + s.in.timeout = r->in.timeout; + s.in.force_apps = r->in.force_apps; + s.in.reboot = r->in.reboot; + s.in.reason = 0; /* thunk down to _winreg_InitiateSystemShutdownEx() (just returns a status) */ - return _winreg_InitiateSystemShutdownEx( p, hostname, message, timeout, - force_apps, reboot, reason ); + return _winreg_InitiateSystemShutdownEx( p, &s ); } /******************************************************************* ********************************************************************/ -WERROR _initshutdown_InitEx(pipes_struct *p, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot, uint32_t reason) +WERROR _initshutdown_InitEx(pipes_struct *p, struct initshutdown_InitEx *r) { - return _winreg_InitiateSystemShutdownEx( p, hostname, message, timeout, - force_apps, reboot, reason ); + struct winreg_InitiateSystemShutdownEx s; + s.in.hostname = r->in.hostname; + s.in.message = r->in.message; + s.in.timeout = r->in.timeout; + s.in.force_apps = r->in.force_apps; + s.in.reboot = r->in.reboot; + s.in.reason = r->in.reason; + + return _winreg_InitiateSystemShutdownEx( p, &s); } @@ -57,7 +70,9 @@ WERROR _initshutdown_InitEx(pipes_struct *p, uint16_t *hostname, struct initshut reg_abort_shutdwon ********************************************************************/ -WERROR _initshutdown_Abort(pipes_struct *p, uint16_t *server) +WERROR _initshutdown_Abort(pipes_struct *p, struct initshutdown_Abort *r) { - return _winreg_AbortSystemShutdown( p, server ); + struct winreg_AbortSystemShutdown s; + s.in.server = r->in.server; + return _winreg_AbortSystemShutdown( p, &s ); } |