From 78b20443c587d303aa33f594c746c38e2689004d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 5 Mar 2008 10:34:45 +0100 Subject: Use pidl for _srvsvc_NetRemoteTOD(). Guenther (This used to be commit 2b4e0f0593c6378cdac4811ded830ca694afac9e) --- source3/rpc_server/srv_srvsvc_nt.c | 55 +++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 31 deletions(-) (limited to 'source3/rpc_server/srv_srvsvc_nt.c') diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index 75c262a7a6..4efea33738 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -2054,12 +2054,13 @@ WERROR _srv_net_share_del_sticky(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_ } /******************************************************************* -time of day + _srvsvc_NetRemoteTOD ********************************************************************/ -WERROR _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u) +WERROR _srvsvc_NetRemoteTOD(pipes_struct *p, + struct srvsvc_NetRemoteTOD *r) { - TIME_OF_DAY_INFO *tod; + struct srvsvc_NetRemoteTODInfo *tod; struct tm *t; time_t unixdate = time(NULL); @@ -2068,37 +2069,35 @@ WERROR _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET uint32 zone = get_time_zone(unixdate)/60; - DEBUG(5,("_srv_net_remote_tod: %d\n", __LINE__)); + DEBUG(5,("_srvsvc_NetRemoteTOD: %d\n", __LINE__)); - if ( !(tod = TALLOC_ZERO_P(p->mem_ctx, TIME_OF_DAY_INFO)) ) + if ( !(tod = TALLOC_ZERO_P(p->mem_ctx, struct srvsvc_NetRemoteTODInfo)) ) return WERR_NOMEM; - r_u->tod = tod; - r_u->ptr_srv_tod = 0x1; - r_u->status = WERR_OK; + *r->out.info = tod; - DEBUG(5,("_srv_net_remote_tod: %d\n", __LINE__)); + DEBUG(5,("_srvsvc_NetRemoteTOD: %d\n", __LINE__)); t = gmtime(&unixdate); /* set up the */ - init_time_of_day_info(tod, - unixdate, - 0, - t->tm_hour, - t->tm_min, - t->tm_sec, - 0, - zone, - 10000, - t->tm_mday, - t->tm_mon + 1, - 1900+t->tm_year, - t->tm_wday); - - DEBUG(5,("_srv_net_remote_tod: %d\n", __LINE__)); + init_srvsvc_NetRemoteTODInfo(tod, + unixdate, + 0, + t->tm_hour, + t->tm_min, + t->tm_sec, + 0, + zone, + 10000, + t->tm_mday, + t->tm_mon + 1, + 1900+t->tm_year, + t->tm_wday); - return r_u->status; + DEBUG(5,("_srvsvc_NetRemoteTOD: %d\n", __LINE__)); + + return WERR_OK; } /*********************************************************************************** @@ -2597,12 +2596,6 @@ WERROR _srvsvc_NetTransportDel(pipes_struct *p, struct srvsvc_NetTransportDel *r return WERR_NOT_SUPPORTED; } -WERROR _srvsvc_NetRemoteTOD(pipes_struct *p, struct srvsvc_NetRemoteTOD *r) -{ - p->rng_fault_state = True; - return WERR_NOT_SUPPORTED; -} - WERROR _srvsvc_NetSetServiceBits(pipes_struct *p, struct srvsvc_NetSetServiceBits *r) { p->rng_fault_state = True; -- cgit