Exemplo n.º 1
0
static int rap_printq_info(int argc, const char **argv)
{
	struct cli_state *cli;
	int ret;
	
	if (argc == 0) 
                return net_rap_printq_usage(argc, argv);

	if (!(cli = net_make_ipc_connection(0))) 
                return -1;

	d_printf(PRINTQ_ENUM_DISPLAY, cli->desthost); /* list header */
	ret = cli_NetPrintQGetInfo(cli, argv[0], enum_queue, enum_jobs);
	cli_shutdown(cli);
	return ret;
}
Exemplo n.º 2
0
static int rap_printq_info(struct net_context *c, int argc, const char **argv)
{
	struct cli_state *cli;
	int ret;

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

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

	d_printf(PRINTQ_ENUM_DISPLAY, smbXcli_conn_remote_name(cli->conn)); /* list header */
	ret = cli_NetPrintQGetInfo(cli, argv[0], enum_queue, enum_jobs);
	cli_shutdown(cli);
	return ret;
}