s3-parse_prs: Remove unuesd functions
authorSimo Sorce <idra@samba.org>
Thu, 15 Jul 2010 21:27:11 +0000 (17:27 -0400)
committerGünther Deschner <gd@samba.org>
Thu, 15 Jul 2010 23:51:18 +0000 (01:51 +0200)
Signed-off-by: Günther Deschner <gd@samba.org>
source3/include/proto.h
source3/rpc_parse/parse_prs.c

index a9ae3d6973c791bb64c4440d40f41905a220fcaa..abb498ce4d82de0ab3e2f548e3dadb250cb3ba42 100644 (file)
@@ -5020,10 +5020,6 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
 
 /* The following definitions come from rpc_parse/parse_prs.c  */
 
-void prs_dump(const char *name, int v, prs_struct *ps);
-void prs_dump_before(const char *name, int v, prs_struct *ps);
-void prs_dump_region(const char *name, int v, uint8_t *data_p,
-                    int from_off, int to_off);
 void prs_debug(prs_struct *ps, int depth, const char *desc, const char *fn_name);
 bool prs_init(prs_struct *ps, uint32 size, TALLOC_CTX *ctx, bool io);
 void prs_mem_free(prs_struct *ps);
index ebe1f4ec55a3abdd2348a8ae5e599950553ab54d..0eecc4c69817a53f9a48f8193c2531d6d3e8913e 100644 (file)
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_PARSE
 
-/**
- * Dump a prs to a file: from the current location through to the end.
- **/
-void prs_dump(const char *name, int v, prs_struct *ps)
-{
-       prs_dump_region(name, v,
-                       (uint8_t *)ps->data_p,
-                       ps->data_offset, ps->buffer_size);
-}
-
-/**
- * Dump from the start of the prs to the current location.
- **/
-void prs_dump_before(const char *name, int v, prs_struct *ps)
-{
-       prs_dump_region(name, v,
-                       (uint8_t *)ps->data_p,
-                       0, ps->data_offset);
-}
-
-/**
- * Dump everything from the start of the prs up to the current location.
- **/
-void prs_dump_region(const char *name, int v, uint8_t *data_p,
-                    int from_off, int to_off)
-{
-       int fd, i;
-       char *fname = NULL;
-       ssize_t sz;
-       if (DEBUGLEVEL < 50) return;
-       for (i=1;i<100;i++) {
-               if (v != -1) {
-                       if (asprintf(&fname,"/tmp/%s_%d.%d.prs", name, v, i) < 0) {
-                               return;
-                       }
-               } else {
-                       if (asprintf(&fname,"/tmp/%s.%d.prs", name, i) < 0) {
-                               return;
-                       }
-               }
-               fd = open(fname, O_WRONLY|O_CREAT|O_EXCL, 0644);
-               if (fd != -1 || errno != EEXIST) break;
-       }
-       if (fd != -1) {
-               sz = write(fd, data_p + from_off, to_off - from_off);
-               i = close(fd);
-               if ( (sz != to_off-from_off) || (i != 0) ) {
-                       DEBUG(0,("Error writing/closing %s: %ld!=%ld %d\n", fname, (unsigned long)sz, (unsigned long)to_off-from_off, i ));
-               } else {
-                       DEBUG(0,("created %s\n", fname));
-               }
-       }
-       SAFE_FREE(fname);
-}
-
 /*******************************************************************
  Debug output for parsing info