summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-03-03 16:44:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:55 -0500
commite33b728c7b2076917e2149191222b259e5c1d942 (patch)
tree1144d7f4e0da8594598a77e015924e029356bdb0 /source3/rpc_server/srv_spoolss.c
parenta7552e677ed1c2df795c844987a7b7036c93bb35 (diff)
downloadsamba-e33b728c7b2076917e2149191222b259e5c1d942.tar.gz
samba-e33b728c7b2076917e2149191222b259e5c1d942.tar.bz2
samba-e33b728c7b2076917e2149191222b259e5c1d942.zip
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)
Diffstat (limited to 'source3/rpc_server/srv_spoolss.c')
-rwxr-xr-xsource3/rpc_server/srv_spoolss.c55
1 files changed, 10 insertions, 45 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index b3a67dd6cf..0a43e8ae8a 100755
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -1519,66 +1519,34 @@ static BOOL api_spoolss_deleteprinterdriverex(pipes_struct *p)
return True;
}
-#if 0
-
-/****************************************************************************
-****************************************************************************/
-
-static BOOL api_spoolss_replyopenprinter(pipes_struct *p)
-{
- SPOOL_Q_REPLYOPENPRINTER q_u;
- SPOOL_R_REPLYOPENPRINTER r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!spoolss_io_q_replyopenprinter("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_replyopenprinter: unable to unmarshall SPOOL_Q_REPLYOPENPRINTER.\n"));
- return False;
- }
-
- r_u.status = _spoolss_replyopenprinter(p, &q_u, &r_u);
-
- if(!spoolss_io_r_replyopenprinter("", &r_u, rdata, 0)) {
- DEBUG(0,("spoolss_io_r_replyopenprinter: unable to marshall SPOOL_R_REPLYOPENPRINTER.\n"));
- return False;
- }
-
- return True;
-}
-
/****************************************************************************
****************************************************************************/
-static BOOL api_spoolss_replycloseprinter(pipes_struct *p)
+static BOOL api_spoolss_xcvdataport(pipes_struct *p)
{
- SPOOL_Q_REPLYCLOSEPRINTER q_u;
- SPOOL_R_REPLYCLOSEPRINTER r_u;
+ SPOOL_Q_XCVDATAPORT q_u;
+ SPOOL_R_XCVDATAPORT r_u;
prs_struct *data = &p->in_data.data;
prs_struct *rdata = &p->out_data.rdata;
ZERO_STRUCT(q_u);
ZERO_STRUCT(r_u);
- if(!spoolss_io_q_replycloseprinter("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_replycloseprinter: unable to unmarshall SPOOL_Q_REPLYCLOSEPRINTER.\n"));
+ if(!spoolss_io_q_xcvdataport("", &q_u, data, 0)) {
+ DEBUG(0,("spoolss_io_q_replyopenprinter: unable to unmarshall SPOOL_Q_XCVDATAPORT.\n"));
return False;
}
- r_u.status = _spoolss_replycloseprinter(p, &q_u, &r_u);
+ r_u.status = _spoolss_xcvdataport(p, &q_u, &r_u);
- if(!spoolss_io_r_replycloseprinter("", &r_u, rdata, 0)) {
- DEBUG(0,("spoolss_io_r_replycloseprinter: unable to marshall SPOOL_R_REPLYCLOSEPRINTER.\n"));
+ if(!spoolss_io_r_xcvdataport("", &r_u, rdata, 0)) {
+ DEBUG(0,("spoolss_io_r_replyopenprinter: unable to marshall SPOOL_R_XCVDATAPORT.\n"));
return False;
}
return True;
}
-#endif
-
/*******************************************************************
\pipe\spoolss commands
********************************************************************/
@@ -1636,11 +1604,8 @@ static BOOL api_spoolss_replycloseprinter(pipes_struct *p)
{"SPOOLSS_GETPRINTPROCESSORDIRECTORY",SPOOLSS_GETPRINTPROCESSORDIRECTORY,api_spoolss_getprintprocessordirectory},
{"SPOOLSS_ADDPRINTERDRIVEREX", SPOOLSS_ADDPRINTERDRIVEREX, api_spoolss_addprinterdriverex },
{"SPOOLSS_DELETEPRINTERDRIVEREX", SPOOLSS_DELETEPRINTERDRIVEREX, api_spoolss_deleteprinterdriverex },
-#if 0
- {"SPOOLSS_REPLYOPENPRINTER", SPOOLSS_REPLYOPENPRINTER, api_spoolss_replyopenprinter },
- {"SPOOLSS_REPLYCLOSEPRINTER", SPOOLSS_REPLYCLOSEPRINTER, api_spoolss_replycloseprinter }
-#endif
- };
+ {"SPOOLSS_XCVDATAPORT", SPOOLSS_XCVDATAPORT, api_spoolss_xcvdataport },
+};
void spoolss_get_pipe_fns( struct api_struct **fns, int *n_fns )
{