Example #1
0
static int rap_session_delete(int argc, const char **argv)
{
	struct cli_state *cli;
	int ret;
	
	if (!(cli = net_make_ipc_connection(0))) 
                return -1;

	if (argc == 0) 
                return net_rap_session_usage(argc, argv);

	ret = cli_NetSessionDel(cli, argv[0]);
	cli_shutdown(cli);
	return ret;
}
Example #2
0
static int rap_session_delete(struct net_context *c, int argc, const char **argv)
{
	struct cli_state *cli;
	int ret;

	if (argc == 0 || c->display_usage)
                return net_rap_session_usage(c, argc, argv);

	if (!NT_STATUS_IS_OK(net_make_ipc_connection(c, 0, &cli)))
                return -1;

	ret = cli_NetSessionDel(cli, argv[0]);
	cli_shutdown(cli);
	return ret;
}