1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

spoolenum commend (when compiled with the new prs_unistr())

now works.   :-)




jerry
(This used to be commit 588aadb29f)
This commit is contained in:
Gerald Carter 2000-07-10 19:57:30 +00:00
parent 997e113a56
commit 1c8c1c03a0

View File

@ -35,18 +35,20 @@ extern FILE* out_hnd;
extern struct user_creds *usr_creds;
/********************************************************************
initialize a spoolss NEW_BUFFER.
** WARNING ** Calling this function on an existing buffer
(which already hgolds data in the buffer->prs.data_p)
will result in memory leakage
********************************************************************/
static void init_buffer(NEW_BUFFER *buffer, uint32 size)
{
int new_size = 0;
buffer->ptr = (size!=0)? 1:0;
buffer->size=size;
buffer->string_at_end=size;
prs_init(&(buffer->prs), MAX_PDU_FRAG_LEN, 4, MARSHALL);
new_size = MAX(size,buffer->prs.buffer_size) - MIN(size,buffer->prs.buffer_size);
prs_grow(&(buffer->prs), new_size);
buffer->prs.io=MARSHALL;
buffer->prs.data_offset=0;
prs_init(&(buffer->prs), size, 4, MARSHALL);
buffer->struct_start = prs_offset(&buffer->prs);
}
static void decode_printer_info_0(NEW_BUFFER *buffer, uint32 returned, PRINTER_INFO_0 **info)