summaryrefslogtreecommitdiffstats
path: root/source/include/client.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-07-27 00:47:19 +0000
committerJeremy Allison <jra@samba.org>2000-07-27 00:47:19 +0000
commit0ff2ce543ee54f7364e6d839db6d06e7ef1edcf4 (patch)
treeb9cfdae0a18239efb1bde5221e13a75a8508fd41 /source/include/client.h
parentc267b23620677a11f702bfea4885a28e66a05b05 (diff)
downloadsamba-0ff2ce543ee54f7364e6d839db6d06e7ef1edcf4.tar.gz
samba-0ff2ce543ee54f7364e6d839db6d06e7ef1edcf4.tar.xz
samba-0ff2ce543ee54f7364e6d839db6d06e7ef1edcf4.zip
Ok - this is a *BIG* change - but it fixes the problems with static strings
in the RPC code. This change was prompted by trying to save a long (>256) character comment in the printer properties page. The new system associates a TALLOC_CTX with the pipe struct, and frees the pool on return of a complete PDU. A global TALLOC_CTX is used for the odd buffer allocated in the BUFFERxx code, and is freed in the main loop. This code works with insure, and seems to be free of memory leaks and crashes (so far) but there are probably the occasional problem with code that uses UNISTRxx structs on the stack and expects them to contain storage without doing a init_unistrXX(). This means that rpcclient will probably be horribly broken. A TALLOC_CTX also needed associating with the struct cli_state also, to make the prs_xx code there work. The main interface change is the addition of a TALLOC_CTX to the prs_init calls - used for dynamic allocation in the prs_XXX calls. Now this is in place it should make dynamic allocation of all RPC memory on unmarshall *much* easier to fix. Jeremy.
Diffstat (limited to 'source/include/client.h')
-rw-r--r--source/include/client.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/include/client.h b/source/include/client.h
index 625277d856c..748c7375e11 100644
--- a/source/include/client.h
+++ b/source/include/client.h
@@ -107,6 +107,8 @@ struct cli_state {
int win95;
uint32 capabilities;
+ TALLOC_CTX *mem_ctx;
+
/*
* Only used in NT domain calls.
*/