From e33b728c7b2076917e2149191222b259e5c1d942 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 3 Mar 2006 16:44:30 +0000 Subject: r13815: "Into the blind world let us now descend," Began the poet, his face as pale as death. "I will go first, and you will follow me." --- Adding XcvDataPort() to the spoolss code for remotely add ports. The design is to allow an intuitive means of creating a new CUPS print queue from the Windows 2000/XP APW without hacks like specifying the deviceURI in the location field of the printer properties dialog. Also set 'default devmode = yes' as the new default since it causes no harm and only is executed when you have a NULL devmode anyways. (This used to be commit 123e478ce5b5f63a61d00197332b847e83722468) --- source3/rpc_parse/parse_spoolss.c | 64 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'source3/rpc_parse/parse_spoolss.c') diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index 45b683e9c6..6f3245243d 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -7406,3 +7406,67 @@ BOOL make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle, return True; } + + +/******************************************************************* + ********************************************************************/ + +BOOL spoolss_io_q_xcvdataport(const char *desc, SPOOL_Q_XCVDATAPORT *q_u, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "spoolss_io_q_xcvdataport"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth)) + return False; + + if(!smb_io_unistr2("", &q_u->dataname, True, ps, depth)) + return False; + + if (!prs_align(ps)) + return False; + + if(!prs_rpcbuffer("", ps, depth, &q_u->indata)) + return False; + + if (!prs_align(ps)) + return False; + + if (!prs_uint32("indata_len", ps, depth, &q_u->indata_len)) + return False; + if (!prs_uint32("offered", ps, depth, &q_u->offered)) + return False; + if (!prs_uint32("unknown", ps, depth, &q_u->unknown)) + return False; + + return True; +} + +/******************************************************************* + ********************************************************************/ + +BOOL spoolss_io_r_xcvdataport(const char *desc, SPOOL_R_XCVDATAPORT *r_u, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "spoolss_io_r_xcvdataport"); + depth++; + + if(!prs_align(ps)) + return False; + if(!prs_rpcbuffer("", ps, depth, &r_u->outdata)) + return False; + + if (!prs_align(ps)) + return False; + + if(!prs_pointer("unknown1", ps, depth, (void**)&r_u->unknown1, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_uint32)) + return False; + if(!prs_pointer("unknown2", ps, depth, (void**)&r_u->unknown2, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_uint32)) + return False; + if(!prs_werror("status", ps, depth, &r_u->status)) + return False; + + return True; +} + -- cgit