[dovecot-cvs]
dovecot/src/imap cmd-capability.c,1.4,1.5 common.h,1.6,1.7
main.c,1.34,1.35
cras at procontrol.fi
cras at procontrol.fi
Mon Jun 30 19:54:19 EEST 2003
Update of /home/cvs/dovecot/src/imap
In directory danu:/tmp/cvs-serv14680
Modified Files:
cmd-capability.c common.h main.c
Log Message:
Keep capability in string_t so plugins can modify it.
Index: cmd-capability.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-capability.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cmd-capability.c 15 Jun 2003 03:42:28 -0000 1.4
+++ cmd-capability.c 30 Jun 2003 15:54:17 -0000 1.5
@@ -2,12 +2,13 @@
#include "common.h"
#include "commands.h"
+#include "str.h"
int cmd_capability(struct client *client)
{
- client_send_line(client, "* CAPABILITY " CAPABILITY_STRING);
+ client_send_line(client, t_strconcat("* CAPABILITY ",
+ str_c(capability_string), NULL));
- client_sync_full_fast(client);
client_send_tagline(client, "OK Capability completed.");
return TRUE;
}
Index: common.h
===================================================================
RCS file: /home/cvs/dovecot/src/imap/common.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- common.h 20 Feb 2003 00:46:17 -0000 1.6
+++ common.h 30 Jun 2003 15:54:17 -0000 1.7
@@ -16,4 +16,6 @@
extern struct ioloop *ioloop;
extern unsigned int max_custom_flag_length, mailbox_check_interval;
+extern string_t *capability_string;
+
#endif
Index: main.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/main.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- main.c 23 May 2003 14:39:45 -0000 1.34
+++ main.c 30 Jun 2003 15:54:17 -0000 1.35
@@ -3,6 +3,7 @@
#include "common.h"
#include "ioloop.h"
#include "ostream.h"
+#include "str.h"
#include "lib-signals.h"
#include "rawlog.h"
#include "restrict-access.h"
@@ -25,6 +26,8 @@
static struct module *modules;
static char log_prefix[128]; /* syslog() needs this to be permanent */
+string_t *capability_string;
+
static void sig_quit(int signo __attr_unused__)
{
io_loop_stop(ioloop);
@@ -85,6 +88,9 @@
if (user == NULL)
i_fatal("USER environment missing");
}
+
+ capability_string = str_new(default_pool, sizeof(CAPABILITY_STRING)+32);
+ str_append(capability_string, CAPABILITY_STRING);
hin = 0; hout = 1;
rawlog_open(&hin, &hout);
More information about the dovecot-cvs
mailing list