summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-07-25 21:07:46 +0000
committerGerald Carter <jerry@samba.org>2000-07-25 21:07:46 +0000
commit48a3e00224cf3dbfc903c99d6110a09a5efabca4 (patch)
tree7caac71c89482ecb5ec2517d4105af84dea089bf /source3/rpc_client
parent5a98f9cb35835efdfe384b82e31e319276496ef4 (diff)
downloadsamba-48a3e00224cf3dbfc903c99d6110a09a5efabca4.tar.gz
samba-48a3e00224cf3dbfc903c99d6110a09a5efabca4.tar.bz2
samba-48a3e00224cf3dbfc903c99d6110a09a5efabca4.zip
some initial code for AddPrinterEx() project. Most is ifdef'd out
'cause it's not all written. -jerry (This used to be commit 2c0f6bcc8f926ee9c17de12671075e8a9239bb94)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/msrpc_spoolss.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/source3/rpc_client/msrpc_spoolss.c b/source3/rpc_client/msrpc_spoolss.c
index 34e6d4404c..72ca7ee5c0 100644
--- a/source3/rpc_client/msrpc_spoolss.c
+++ b/source3/rpc_client/msrpc_spoolss.c
@@ -182,8 +182,11 @@ static void decode_printerdriverdir_info_1(NEW_BUFFER *buffer, DRIVER_DIRECTORY_
}
-static void decode_port_info_2(NEW_BUFFER *buffer, uint32 returned,
- PORT_INFO_2 **info)
+/**********************************************************************
+ Decode a PORT_INFO_2 struct from a NEW_BUFFER
+**********************************************************************/
+void decode_port_info_2(NEW_BUFFER *buffer, uint32 returned,
+ PORT_INFO_2 **info)
{
uint32 i;
PORT_INFO_2 *inf;
@@ -199,6 +202,28 @@ static void decode_port_info_2(NEW_BUFFER *buffer, uint32 returned,
*info=inf;
}
+/**********************************************************************
+ Decode a PORT_INFO_1 struct from a NEW_BUFFER
+**********************************************************************/
+void decode_port_info_1(NEW_BUFFER *buffer, uint32 returned,
+ PORT_INFO_1 **info)
+{
+ uint32 i;
+ PORT_INFO_1 *inf;
+
+ inf=(PORT_INFO_1*)malloc(returned*sizeof(PORT_INFO_1));
+
+ prs_set_offset(&buffer->prs, 0);
+
+ for (i=0; i<returned; i++) {
+ /* WRITEME!!!! yet to be written --jerry */
+ /* new_smb_io_port_info_1("", buffer, &(inf[i]), 0); */
+ ;;
+ }
+
+ *info=inf;
+}
+
/****************************************************************************
nt spoolss query
****************************************************************************/
@@ -282,6 +307,9 @@ BOOL msrpc_spoolss_enum_ports(char* srv_name,
if (returned != 0)
{
switch (level) {
+ case 1:
+ decode_port_info_1(&buffer, returned, &ctr->port.info_1);
+ break;
case 2:
decode_port_info_2(&buffer, returned, &ctr->port.info_2);
break;