s3-spoolss: fix rpcclient after setprinter IDL fixes.
[ira/wip.git] / source3 / rpcclient / cmd_ntsvcs.c
index eb620d06b269f30a2bc5a9fceeb5ebf7037aaa18..95b905ab2ddf3330a8d5df0d0f38246a4b3e3703 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "includes.h"
 #include "rpcclient.h"
+#include "../librpc/gen_ndr/cli_ntsvcs.h"
 
 static WERROR cmd_ntsvcs_get_version(struct rpc_pipe_client *cli,
                                     TALLOC_CTX *mem_ctx,
@@ -235,17 +236,21 @@ static WERROR cmd_ntsvcs_get_dev_list(struct rpc_pipe_client *cli,
        uint32_t length = 0;
        uint32_t flags = 0;
 
-       if (argc > 3) {
-               printf("usage: %s [length] [filter]\n", argv[0]);
+       if (argc > 4) {
+               printf("usage: %s [filter] [length] [flags]\n", argv[0]);
                return WERR_OK;
        }
 
        if (argc >= 2) {
-               length = atoi(argv[1]);
+               filter = argv[1];
        }
 
        if (argc >= 3) {
-               filter = argv[2];
+               length = atoi(argv[2]);
+       }
+
+       if (argc >= 4) {
+               flags = atoi(argv[3]);
        }
 
        buffer = talloc(mem_ctx, uint16_t);