summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_prs.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-07-14 16:58:03 +0000
committerGerald Carter <jerry@samba.org>2000-07-14 16:58:03 +0000
commit2c46a26a8bbc4130a6dc195a77b760d26016d5a1 (patch)
treee1a1ccf763b88800aff09643df2b9b7841853a83 /source3/rpc_parse/parse_prs.c
parent02fd5b08b55b8ff60eb9f78d5d61f889d102cad0 (diff)
downloadsamba-2c46a26a8bbc4130a6dc195a77b760d26016d5a1.tar.gz
samba-2c46a26a8bbc4130a6dc195a77b760d26016d5a1.tar.bz2
samba-2c46a26a8bbc4130a6dc195a77b760d26016d5a1.zip
removed prs_data(), prs_free_data(), and prs_realloc_data()
as these were unneeded and replaced by the real functions already in HEAD. Added a few more functions to parse_spoolss.c to help with the rpcclient merge from TNG. (This used to be commit 3bc9af4c1dbdb664970541f6091982ffccc87b31)
Diffstat (limited to 'source3/rpc_parse/parse_prs.c')
-rw-r--r--source3/rpc_parse/parse_prs.c93
1 files changed, 0 insertions, 93 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 5b5834084f..1bda5ef506 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -897,99 +897,6 @@ BOOL prs_uint32_post(char *name, prs_struct *ps, int depth, uint32 *data32,
return True;
}
-/*******************************************************************
- frees a memory buffer.
- ********************************************************************/
-void prs_free_data(prs_struct *buf)
-{
- if (buf == NULL)
- return;
-
- if (buf->data_p != NULL)
- {
- free(buf->data_p);
- buf->data_p = NULL;
- }
- buf->buffer_size = 0;
-}
-
-/*******************************************************************
- reallocate a memory buffer
-********************************************************************/
-BOOL prs_realloc_data(prs_struct *buf, size_t new_size)
-{
- char *new_data;
-
- /* prs_sma_init(); JERRY */
-
- prs_debug(buf, 200, "prs_realloc_data - before", "prs_realloc_data");
-
- SMB_ASSERT(((ssize_t) new_size) >= 0);
-
- if (new_size == 0)
- {
- prs_free_data(buf);
- return True;
- }
-
- /* new_data = sma_realloc(prs_sma_region, buf->data_p, new_size); */
- new_data = realloc(buf->data_p, new_size);
-
- if (new_data != NULL)
- {
- if (new_size > buf->buffer_size)
- {
- memset(&new_data[buf->buffer_size], 0,
- new_size - buf->buffer_size);
- }
- buf->data_p = new_data;
- buf->buffer_size = new_size;
- }
- else if (buf->buffer_size >= new_size)
- {
- DEBUG(3, ("prs_realloc_data: warning - "
- "could not realloc to %d\n", new_size));
- }
- else
- {
- DEBUG(3, ("prs_realloc_data: error - "
- "could not realloc to %d\n", new_size));
-
- prs_free_data(buf);
- return False;
- }
-
- prs_debug(buf, 200, "prs_realloc_data - after", "prs_realloc_data");
- return True;
-}
-
-/*******************************************************************
- return the memory location specified by offset; may return NULL.
- ********************************************************************/
-char *prs_data(const prs_struct *buf, uint32 offset)
-{
-
- /* do we have something to look at? */
- if (buf == NULL)
- return NULL;
-
- /* check to make sure the offset is within range */
- if ((offset < 0) || (offset >= buf->buffer_size))
- return NULL;
-
- /* locate the memory address */
- if (buf->data_p != NULL)
- {
- return &(buf->data_p[offset]);
- }
-
- /* default return */
- return NULL;
-}
-
-
-
-
/* useful function to store a structure in rpc wire format */
int tdb_prs_store(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps)
{