Mercurial > dovecot > original-hg > dovecot-1.2
view src/imap/cmd-uid.c @ 924:4f697dde0fca HEAD
THREAD=REFERENCES implementation. Doesn't crash, but I'm not sure how
correct replies it produces :)
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 08 Jan 2003 22:49:51 +0200 |
parents | fd8888f6f037 |
children | bd489d13479e |
line wrap: on
line source
/* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "commands.h" int cmd_uid(struct client *client) { const char *cmd; /* UID <command> <args> */ cmd = imap_parser_read_word(client->parser); if (cmd == NULL) return FALSE; client->cmd_func = NULL; switch (*cmd) { case 'c': case 'C': if (strcasecmp(cmd, "COPY") == 0) client->cmd_func = cmd_copy; break; case 'f': case 'F': if (strcasecmp(cmd, "FETCH") == 0) client->cmd_func = cmd_fetch; break; case 's': case 'S': if (strcasecmp(cmd, "STORE") == 0) client->cmd_func = cmd_store; else if (strcasecmp(cmd, "SEARCH") == 0) client->cmd_func = cmd_search; else if (strcasecmp(cmd, "SORT") == 0) client->cmd_func = cmd_sort; break; case 't': case 'T': if (strcasecmp(cmd, "THREAD") == 0) client->cmd_func = cmd_thread; break; } if (client->cmd_func != NULL) { client->cmd_uid = TRUE; return client->cmd_func(client); } else { client_send_tagline(client, t_strconcat( "BAD Unknown UID command ", cmd, NULL)); return TRUE; } }