Use pidl for _PNP_GetVersion().
authorGünther Deschner <gd@samba.org>
Sun, 17 Feb 2008 22:17:51 +0000 (23:17 +0100)
committerGünther Deschner <gd@samba.org>
Sun, 17 Feb 2008 22:29:56 +0000 (23:29 +0100)
Guenther

source/rpc_server/srv_ntsvcs.c
source/rpc_server/srv_ntsvcs_nt.c

index 0734a60b4d14803ea05ee978b67d47d66110ad51..ec65919646e48792b250500a6b976eb7b4b11411 100644 (file)
@@ -48,23 +48,7 @@ static bool proxy_ntsvcs_call(pipes_struct *p, uint8_t opnum)
 
 static bool api_ntsvcs_get_version(pipes_struct *p)
 {
-       NTSVCS_Q_GET_VERSION q_u;
-       NTSVCS_R_GET_VERSION 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(!ntsvcs_io_q_get_version("", &q_u, data, 0))
-               return False;
-
-       r_u.status = _ntsvcs_get_version(p, &q_u, &r_u);
-
-       if(!ntsvcs_io_r_get_version("", &r_u, rdata, 0))
-               return False;
-
-       return True;
+       return proxy_ntsvcs_call(p, NDR_PNP_GETVERSION);
 }
 
 /*******************************************************************
index c7ca0df0972d5eab7f0203a6ff12f193c5bef1f2..0cf2e5cc1925afdb9b03f8eb1df5106ad5ebd7f0 100644 (file)
@@ -34,10 +34,11 @@ static char* get_device_path(TALLOC_CTX *mem_ctx, const char *device )
 /********************************************************************
 ********************************************************************/
 
-WERROR _ntsvcs_get_version( pipes_struct *p, NTSVCS_Q_GET_VERSION *q_u, NTSVCS_R_GET_VERSION *r_u )
+WERROR _PNP_GetVersion(pipes_struct *p,
+                      struct PNP_GetVersion *r)
 {
-       r_u->version = 0x00000400;      /* no idea what this means */
-               
+       *r->out.version = 0x0400;      /* no idea what this means */
+
        return WERR_OK;
 }
 
@@ -197,16 +198,6 @@ WERROR _PNP_Connect(pipes_struct *p,
 /****************************************************************
 ****************************************************************/
 
-WERROR _PNP_GetVersion(pipes_struct *p,
-                      struct PNP_GetVersion *r)
-{
-       p->rng_fault_state = true;
-       return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
-****************************************************************/
-
 WERROR _PNP_GetGlobalState(pipes_struct *p,
                           struct PNP_GetGlobalState *r)
 {