summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_spoolss.c
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2000-03-13 11:09:20 +0000
committerJean-François Micouleau <jfm@samba.org>2000-03-13 11:09:20 +0000
commit79bfb14318423f5a26a4d0dc6fc6faa62b1401f8 (patch)
tree4b63e518f2eadb1c0f5acc2fd96da2208b516e7d /source3/rpc_parse/parse_spoolss.c
parent530a01c2cbf787e4f3ff116aba3e8b392c8871fc (diff)
downloadsamba-79bfb14318423f5a26a4d0dc6fc6faa62b1401f8.tar.gz
samba-79bfb14318423f5a26a4d0dc6fc6faa62b1401f8.tar.bz2
samba-79bfb14318423f5a26a4d0dc6fc6faa62b1401f8.zip
parse correctly getprinterdriver2
found a stupid bug in enumprinters fixed some memleaks found a coredump in enumprinterdata getprinterdriverdir responds correctly now. J.F. (This used to be commit 07f2e194ba61e72320636fb7e5d0f041e255868b)
Diffstat (limited to 'source3/rpc_parse/parse_spoolss.c')
-rw-r--r--source3/rpc_parse/parse_spoolss.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 902cc058c3..85d295eb3f 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -1933,7 +1933,7 @@ BOOL new_smb_io_driverdir_1(char *desc, NEW_BUFFER *buffer, DRIVER_DIRECTORY_1 *
buffer->struct_start=prs_offset(ps);
- if(!new_smb_io_relstr("name", buffer, depth, &info->name))
+ if (!spoolss_smb_io_unistr(desc, &info->name, ps, depth))
return False;
return True;
@@ -2318,7 +2318,9 @@ uint32 spoolss_size_driverdir_info_1(DRIVER_DIRECTORY_1 *info)
{
int size=0;
- size+=size_of_relative_string( &info->name );
+ size=str_len_uni(&info->name); /* the string length */
+ size=size+1; /* add the leading zero */
+ size=size*2; /* convert in char */
return size;
}
@@ -2419,7 +2421,9 @@ BOOL spoolss_io_q_getprinterdriver2(char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u,
if(!prs_uint32("offered", ps, depth, &q_u->offered))
return False;
- if(!prs_uint32("unknown", ps, depth, &q_u->unknown))
+ if(!prs_uint32("clientmajorversion", ps, depth, &q_u->clientmajorversion))
+ return False;
+ if(!prs_uint32("clientminorversion", ps, depth, &q_u->clientminorversion))
return False;
return True;
@@ -2444,9 +2448,9 @@ BOOL spoolss_io_r_getprinterdriver2(char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u,
return False;
if (!prs_uint32("needed", ps, depth, &r_u->needed))
return False;
- if (!prs_uint32("unknown0", ps, depth, &r_u->unknown0))
+ if (!prs_uint32("servermajorversion", ps, depth, &r_u->servermajorversion))
return False;
- if (!prs_uint32("unknown1", ps, depth, &r_u->unknown1))
+ if (!prs_uint32("serverminorversion", ps, depth, &r_u->serverminorversion))
return False;
if (!prs_uint32("status", ps, depth, &r_u->status))
return False;