1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

Remove unused marshalling for SRV_NET_REMOTE_TOD.

Guenther
(This used to be commit 9f0ea1d727046fef4c23bcf1e71d10f33c93b00f)
This commit is contained in:
Günther Deschner 2008-03-05 10:40:52 +01:00
parent b0dad261ad
commit 1bdce8e5b5
3 changed files with 0 additions and 199 deletions

View File

@ -683,42 +683,6 @@ typedef struct {
WERROR status; WERROR status;
} SRV_R_NET_FILE_ENUM; } SRV_R_NET_FILE_ENUM;
/* SRV_Q_NET_REMOTE_TOD */
typedef struct q_net_remote_tod
{
uint32 ptr_srv_name;
UNISTR2 uni_srv_name; /* "\\server" */
} SRV_Q_NET_REMOTE_TOD;
/* TIME_OF_DAY_INFO */
typedef struct time_of_day_info
{
uint32 elapsedt;
uint32 msecs;
uint32 hours;
uint32 mins;
uint32 secs;
uint32 hunds;
uint32 zone;
uint32 tintervals;
uint32 day;
uint32 month;
uint32 year;
uint32 weekday;
} TIME_OF_DAY_INFO;
/* SRV_R_NET_REMOTE_TOD */
typedef struct r_net_remote_tod
{
uint32 ptr_srv_tod; /* pointer to TOD */
TIME_OF_DAY_INFO *tod;
WERROR status; /* return status */
} SRV_R_NET_REMOTE_TOD;
/* SRV_Q_NET_FILE_QUERY_SECDESC */ /* SRV_Q_NET_FILE_QUERY_SECDESC */
typedef struct q_net_file_query_secdesc typedef struct q_net_file_query_secdesc
{ {

View File

@ -430,39 +430,6 @@ WERROR rpccli_srvsvc_net_share_add(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
return result; return result;
} }
WERROR rpccli_srvsvc_net_remote_tod(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
char *server, TIME_OF_DAY_INFO *tod)
{
prs_struct qbuf, rbuf;
SRV_Q_NET_REMOTE_TOD q;
SRV_R_NET_REMOTE_TOD r;
WERROR result = W_ERROR(ERRgeneral);
fstring server_slash;
ZERO_STRUCT(q);
ZERO_STRUCT(r);
/* Initialise input parameters */
slprintf(server_slash, sizeof(fstring)-1, "\\\\%s", cli->cli->desthost);
strupper_m(server_slash);
init_srv_q_net_remote_tod(&q, server_slash);
r.tod = tod;
/* Marshall data and send request */
CLI_DO_RPC_WERR(cli, mem_ctx, PI_SRVSVC, SRV_NET_REMOTE_TOD,
q, r,
qbuf, rbuf,
srv_io_q_net_remote_tod,
srv_io_r_net_remote_tod,
WERR_GENERAL_FAILURE);
result = r.status;
return result;
}
WERROR rpccli_srvsvc_net_file_enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR rpccli_srvsvc_net_file_enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
uint32 file_level, const char *user_name, uint32 file_level, const char *user_name,
SRV_FILE_INFO_CTR *ctr, int preferred_len, SRV_FILE_INFO_CTR *ctr, int preferred_len,

View File

@ -2618,125 +2618,6 @@ bool srv_io_r_net_file_enum(const char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_stru
return True; return True;
} }
/*******************************************************************
Reads or writes a structure.
********************************************************************/
bool srv_io_q_net_remote_tod(const char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
prs_debug(ps, depth, desc, "srv_io_q_net_remote_tod");
depth++;
if(!prs_align(ps))
return False;
if(!prs_uint32("ptr_srv_name ", ps, depth, &q_n->ptr_srv_name))
return False;
if(!smb_io_unistr2("", &q_n->uni_srv_name, True, ps, depth))
return False;
return True;
}
/*******************************************************************
Reads or writes a TIME_OF_DAY_INFO structure.
********************************************************************/
static bool srv_io_time_of_day_info(const char *desc, TIME_OF_DAY_INFO *tod, prs_struct *ps, int depth)
{
if (tod == NULL)
return False;
prs_debug(ps, depth, desc, "srv_io_time_of_day_info");
depth++;
if(!prs_align(ps))
return False;
if(!prs_uint32("elapsedt ", ps, depth, &tod->elapsedt))
return False;
if(!prs_uint32("msecs ", ps, depth, &tod->msecs))
return False;
if(!prs_uint32("hours ", ps, depth, &tod->hours))
return False;
if(!prs_uint32("mins ", ps, depth, &tod->mins))
return False;
if(!prs_uint32("secs ", ps, depth, &tod->secs))
return False;
if(!prs_uint32("hunds ", ps, depth, &tod->hunds))
return False;
if(!prs_uint32("timezone ", ps, depth, &tod->zone))
return False;
if(!prs_uint32("tintervals ", ps, depth, &tod->tintervals))
return False;
if(!prs_uint32("day ", ps, depth, &tod->day))
return False;
if(!prs_uint32("month ", ps, depth, &tod->month))
return False;
if(!prs_uint32("year ", ps, depth, &tod->year))
return False;
if(!prs_uint32("weekday ", ps, depth, &tod->weekday))
return False;
return True;
}
/*******************************************************************
Inits a TIME_OF_DAY_INFO structure.
********************************************************************/
void init_time_of_day_info(TIME_OF_DAY_INFO *tod, uint32 elapsedt, uint32 msecs,
uint32 hours, uint32 mins, uint32 secs, uint32 hunds,
uint32 zone, uint32 tintervals, uint32 day,
uint32 month, uint32 year, uint32 weekday)
{
DEBUG(5,("init_time_of_day_info\n"));
tod->elapsedt = elapsedt;
tod->msecs = msecs;
tod->hours = hours;
tod->mins = mins;
tod->secs = secs;
tod->hunds = hunds;
tod->zone = zone;
tod->tintervals = tintervals;
tod->day = day;
tod->month = month;
tod->year = year;
tod->weekday = weekday;
}
/*******************************************************************
Reads or writes a structure.
********************************************************************/
bool srv_io_r_net_remote_tod(const char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
prs_debug(ps, depth, desc, "srv_io_r_net_remote_tod");
depth++;
if(!prs_align(ps))
return False;
if(!prs_uint32("ptr_srv_tod ", ps, depth, &r_n->ptr_srv_tod))
return False;
if(!srv_io_time_of_day_info("tod", r_n->tod, ps, depth))
return False;
if(!prs_werror("status", ps, depth, &r_n->status))
return False;
return True;
}
/******************************************************************* /*******************************************************************
initialises a structure. initialises a structure.
********************************************************************/ ********************************************************************/
@ -3098,14 +2979,3 @@ bool srv_io_r_net_file_set_secdesc(const char *desc, SRV_R_NET_FILE_SET_SECDESC
return True; return True;
} }
/*******************************************************************
Inits a structure
********************************************************************/
void init_srv_q_net_remote_tod(SRV_Q_NET_REMOTE_TOD *q_u, const char *server)
{
q_u->ptr_srv_name = 1;
init_unistr2(&q_u->uni_srv_name, server, UNI_STR_TERMINATE);
}