r22808: store default buffer size for samr operations in libnet context.
authorRafal Szczesniak <mimir@samba.org>
Fri, 11 May 2007 21:44:18 +0000 (21:44 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:52:19 +0000 (14:52 -0500)
This allows not requiring it as an argument in some function calls
and still enables specifying any size if it's necessary via libnet
context.

rafal

source/libnet/libnet.c
source/libnet/libnet.h

index 24e291b6f84f79c5cb477c8894e9a5d0d5bf13e3..9f971b59cd9a8a4a9f612bb67e411cb96f9ed67c 100644 (file)
@@ -47,7 +47,10 @@ struct libnet_context *libnet_context_init(struct event_context *ev)
 
        /* connected services' params */
        ZERO_STRUCT(ctx->samr);
-       ZERO_STRUCT(ctx->lsa);
+       ZERO_STRUCT(ctx->lsa);  
+
+       /* default buffer size for various operations requiring specifying a buffer */
+       ctx->samr.buf_size = 128;
 
        return ctx;
 }
index b3660af702e175957ffdf081a9922cbf20561e79..c852c205c663d7a3e3fc00b6e1b7a7803c4d3e61 100644 (file)
@@ -32,6 +32,7 @@ struct libnet_context {
                const char *name;
                uint32_t access_mask;
                struct policy_handle handle;
+               int buf_size;
        } samr;
 
        /* lsa connection parameters - opened handles and related properties */