view src/imap/cmd-uid.c @ 15714:90710c6c3beb

Updated copyright notices to include year 2013.
author Timo Sirainen <tss@iki.fi>
date Sat, 02 Feb 2013 17:01:07 +0200
parents 3f83a27a72b8
children 36ef72481934
line wrap: on
line source

* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */

#include "imap-common.h"
#include "imap-commands.h"

bool cmd_uid(struct client_command_context *cmd)
{
	struct command *command;
	const char *cmd_name;

	/* UID <command> <args> */
	cmd_name = imap_parser_read_word(cmd->parser);
	if (cmd_name == NULL)
		return FALSE;

	command = command_find(t_strconcat("UID ", cmd_name, NULL));
	if (command == NULL) {
		client_send_command_error(cmd, t_strconcat(
			"Unknown UID command ", cmd_name, NULL));
		return TRUE;
	}

	cmd->name = p_strconcat(cmd->pool, "UID ", cmd_name, NULL);
	cmd->cmd_flags = command->flags;
	cmd->func = command->func;
	cmd->uid = TRUE;
	return command_exec(cmd);
}