From 08188dc72e4e962e58145b51f52ae880ce1ff8c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Wed, 12 Mar 2008 16:18:54 +0100 Subject: [PATCH] Remove unused marshalling for SRV_NET_DISK_ENUM. Guenther (This used to be commit 4928f1efceb8cb0b0fda813e6f43f668084caa79) --- source3/include/rpc_srvsvc.h | 25 -------- source3/rpc_parse/parse_srv.c | 139 ------------------------------------------ 2 files changed, 164 deletions(-) diff --git a/source3/include/rpc_srvsvc.h b/source3/include/rpc_srvsvc.h index bc246f2ecf5..4d840d034d8 100644 --- a/source3/include/rpc_srvsvc.h +++ b/source3/include/rpc_srvsvc.h @@ -48,31 +48,6 @@ #define MAX_SERVER_DISK_ENTRIES 15 -typedef struct disk_info { - uint32 unknown; - UNISTR3 disk_name; -} DISK_INFO; - -typedef struct disk_enum_container { - uint32 level; - uint32 entries_read; - uint32 unknown; - uint32 disk_info_ptr; - DISK_INFO *disk_info; -} DISK_ENUM_CONTAINER; - -typedef struct net_srv_disk_enum { - uint32 ptr_srv_name; /* pointer (to server name?) */ - UNISTR2 uni_srv_name; /* server name */ - - DISK_ENUM_CONTAINER disk_enum_ctr; - - uint32 preferred_len; /* preferred maximum length (0xffff ffff) */ - uint32 total_entries; /* total number of entries */ - ENUM_HND enum_hnd; - WERROR status; /* return status */ -} SRV_Q_NET_DISK_ENUM, SRV_R_NET_DISK_ENUM; - /***************************/ /* oops - this is going to take up a *massive* amount of stack. */ diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c index ec214d31f66..b18484893cc 100644 --- a/source3/rpc_parse/parse_srv.c +++ b/source3/rpc_parse/parse_srv.c @@ -987,142 +987,3 @@ bool srv_io_r_net_file_enum(const char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_stru return True; } - -/******************************************************************* - initialises a structure. - ********************************************************************/ - -bool init_srv_q_net_disk_enum(SRV_Q_NET_DISK_ENUM *q_n, - const char *srv_name, - uint32 preferred_len, - ENUM_HND *enum_hnd - ) -{ - - - DEBUG(5,("init_srv_q_net_srv_disk_enum\n")); - - init_buf_unistr2(&q_n->uni_srv_name, &q_n->ptr_srv_name, srv_name); - - q_n->disk_enum_ctr.level = 0; - q_n->disk_enum_ctr.disk_info_ptr = 0; - - q_n->preferred_len = preferred_len; - memcpy(&q_n->enum_hnd, enum_hnd, sizeof(*enum_hnd)); - - return True; -} - -/******************************************************************* - Reads or writes a structure. - ********************************************************************/ - -bool srv_io_q_net_disk_enum(const char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_struct *ps, int depth) -{ - if (q_n == NULL) - return False; - - prs_debug(ps, depth, desc, "srv_io_q_net_disk_enum"); - 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; - - if(!prs_align(ps)) - return False; - - if(!prs_uint32("level", ps, depth, &q_n->disk_enum_ctr.level)) - return False; - - if(!prs_uint32("entries_read", ps, depth, &q_n->disk_enum_ctr.entries_read)) - return False; - - if(!prs_uint32("buffer", ps, depth, &q_n->disk_enum_ctr.disk_info_ptr)) - return False; - - if(!prs_align(ps)) - return False; - - if(!prs_uint32("preferred_len", ps, depth, &q_n->preferred_len)) - return False; - if(!smb_io_enum_hnd("enum_hnd", &q_n->enum_hnd, ps, depth)) - return False; - - return True; -} - -/******************************************************************* - Reads or writes a structure. - ********************************************************************/ - -bool srv_io_r_net_disk_enum(const char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps, int depth) -{ - - unsigned int i; - uint32 entries_read, entries_read2, entries_read3; - - if (r_n == NULL) - return False; - - prs_debug(ps, depth, desc, "srv_io_r_net_disk_enum"); - depth++; - - entries_read = entries_read2 = entries_read3 = r_n->disk_enum_ctr.entries_read; - - if(!prs_align(ps)) - return False; - - if(!prs_uint32("entries_read", ps, depth, &entries_read)) - return False; - if(!prs_uint32("ptr_disk_info", ps, depth, &r_n->disk_enum_ctr.disk_info_ptr)) - return False; - - /*this may be max, unknown, actual?*/ - - if(!prs_uint32("max_elements", ps, depth, &entries_read2)) - return False; - if(!prs_uint32("unknown", ps, depth, &r_n->disk_enum_ctr.unknown)) - return False; - if(!prs_uint32("actual_elements", ps, depth, &entries_read3)) - return False; - - r_n->disk_enum_ctr.entries_read = entries_read3; - - if(UNMARSHALLING(ps) && entries_read3) { - - DISK_INFO *dinfo; - - if(!(dinfo = PRS_ALLOC_MEM(ps, DISK_INFO, entries_read3))) - return False; - r_n->disk_enum_ctr.disk_info = dinfo; - } - - for(i=0; i < entries_read3; i++) { - - if(!prs_uint32("unknown", ps, depth, &r_n->disk_enum_ctr.disk_info[i].unknown)) - return False; - - if(!smb_io_unistr3("disk_name", &r_n->disk_enum_ctr.disk_info[i].disk_name, ps, depth)) - return False; - - if(!prs_align(ps)) - return False; - } - - if(!prs_uint32("total_entries", ps, depth, &r_n->total_entries)) - return False; - - if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth)) - return False; - - if(!prs_werror("status", ps, depth, &r_n->status)) - return False; - - return True; -} -- 2.11.4.GIT