s3-spoolss: fix rpcclient after setprinter IDL fixes.
[ira/wip.git] / source3 / rpcclient / cmd_echo.c
index f3fbd3737a86218bf346f87c83c3cf0870b64b3a..cf5f9e00ef504e172782a6fd74e9a735a7160b14 100644 (file)
@@ -6,7 +6,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
 #include "rpcclient.h"
+#include "../librpc/gen_ndr/cli_echo.h"
 
 static NTSTATUS cmd_echo_add_one(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                                 int argc, const char **argv)
@@ -132,6 +132,8 @@ static NTSTATUS cmd_echo_source_data(struct rpc_pipe_client *cli,
        }
 
 done:
+
+       SAFE_FREE(out_data);
        return result;
 }
 
@@ -175,9 +177,9 @@ struct cmd_set echo_commands[] = {
 
        { "ECHO" },
 
-       { "echoaddone", RPC_RTYPE_NTSTATUS, cmd_echo_add_one,     NULL, PI_RPCECHO, NULL, "Add one to a number", "" },
-       { "echodata",   RPC_RTYPE_NTSTATUS, cmd_echo_data,        NULL, PI_RPCECHO, NULL, "Echo data",           "" },
-       { "sinkdata",   RPC_RTYPE_NTSTATUS, cmd_echo_sink_data,   NULL, PI_RPCECHO, NULL, "Sink data",           "" },
-       { "sourcedata", RPC_RTYPE_NTSTATUS, cmd_echo_source_data, NULL, PI_RPCECHO, NULL, "Source data",         "" },
+       { "echoaddone", RPC_RTYPE_NTSTATUS, cmd_echo_add_one,     NULL, &ndr_table_rpcecho.syntax_id, NULL, "Add one to a number", "" },
+       { "echodata",   RPC_RTYPE_NTSTATUS, cmd_echo_data,        NULL, &ndr_table_rpcecho.syntax_id, NULL, "Echo data",           "" },
+       { "sinkdata",   RPC_RTYPE_NTSTATUS, cmd_echo_sink_data,   NULL, &ndr_table_rpcecho.syntax_id, NULL, "Sink data",           "" },
+       { "sourcedata", RPC_RTYPE_NTSTATUS, cmd_echo_source_data, NULL, &ndr_table_rpcecho.syntax_id, NULL, "Source data",         "" },
        { NULL }
 };