s3-spoolss: use pidl for _spoolss_FindClosePrinterNotify.
authorGünther Deschner <gd@samba.org>
Mon, 9 Feb 2009 12:03:07 +0000 (13:03 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 9 Feb 2009 12:03:07 +0000 (13:03 +0100)
Guenther

source3/rpc_server/srv_spoolss.c
source3/rpc_server/srv_spoolss_nt.c

index 732d127632e44eaad33d7176e4851e37612c6938..bf11bc69149daab71d50c87ba94dc94be53c2fba 100644 (file)
@@ -459,27 +459,7 @@ static bool api_spoolss_setprinter(pipes_struct *p)
 
 static bool api_spoolss_fcpn(pipes_struct *p)
 {
-       SPOOL_Q_FCPN q_u;
-       SPOOL_R_FCPN 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_fcpn("", &q_u, data, 0)) {
-               DEBUG(0,("spoolss_io_q_fcpn: unable to unmarshall SPOOL_Q_FCPN.\n"));
-               return False;
-       }
-
-       r_u.status = _spoolss_fcpn(p, &q_u, &r_u);
-
-       if(!spoolss_io_r_fcpn("",&r_u,rdata,0)) {
-               DEBUG(0,("spoolss_io_r_fcpn: unable to marshall SPOOL_R_FCPN.\n"));
-               return False;
-       }
-
-       return True;
+       return proxy_spoolss_call(p, NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY);
 }
 
 /****************************************************************************
index 3a166ce938e041bf41c74ce49602e66bfb9f3b4a..03ef668bbee05cd7ed20b52932c5eda6311d6d22 100644 (file)
@@ -6572,16 +6572,19 @@ WERROR _spoolss_setprinter(pipes_struct *p, SPOOL_Q_SETPRINTER *q_u, SPOOL_R_SET
        }
 }
 
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_FindClosePrinterNotify
+****************************************************************/
 
-WERROR _spoolss_fcpn(pipes_struct *p, SPOOL_Q_FCPN *q_u, SPOOL_R_FCPN *r_u)
+WERROR _spoolss_FindClosePrinterNotify(pipes_struct *p,
+                                      struct spoolss_FindClosePrinterNotify *r)
 {
-       POLICY_HND *handle = &q_u->handle;
+       POLICY_HND *handle = r->in.handle;
        Printer_entry *Printer= find_printer_index_by_hnd(p, handle);
 
        if (!Printer) {
-               DEBUG(2,("_spoolss_fcpn: Invalid handle (%s:%u:%u)\n", OUR_HANDLE(handle)));
+               DEBUG(2,("_spoolss_FindClosePrinterNotify: "
+                       "Invalid handle (%s:%u:%u)\n", OUR_HANDLE(handle)));
                return WERR_BADFID;
        }
 
@@ -10459,17 +10462,6 @@ WERROR _spoolss_FindNextPrinterChangeNotification(pipes_struct *p,
        return WERR_NOT_SUPPORTED;
 }
 
-/****************************************************************
- _spoolss_FindClosePrinterNotify
-****************************************************************/
-
-WERROR _spoolss_FindClosePrinterNotify(pipes_struct *p,
-                                      struct spoolss_FindClosePrinterNotify *r)
-{
-       p->rng_fault_state = true;
-       return WERR_NOT_SUPPORTED;
-}
-
 /****************************************************************
  _spoolss_RouterFindFirstPrinterChangeNotificationOld
 ****************************************************************/