if ((args = anvil_connection_next_line(conn)) == NULL)
return;
- if (str_array_length(args) < 3 ||
+ if (str_array_length(args) < 4 ||
strcmp(args[0], "VERSION") != 0 ||
- atoi(args[1]) != ANVIL_CLIENT_PROTOCOL_MAJOR_VERSION) {
+ strcmp(args[1], "anvil") != 0 ||
+ atoi(args[2]) != ANVIL_CLIENT_PROTOCOL_MAJOR_VERSION) {
i_error("Anvil client not compatible with this server "
"(mixed old and new binaries?)");
anvil_connection_destroy(conn);
if (line == NULL)
return;
- if (strncmp(line, "VERSION\t", 8) != 0 ||
- atoi(t_strcut(line + 8, '\t')) !=
+ if (strncmp(line, "VERSION\tconfig\t", 15) != 0 ||
+ atoi(t_strcut(line + 15, '\t')) !=
CONFIG_CLIENT_PROTOCOL_MAJOR_VERSION) {
i_error("Config client not compatible with this server "
"(mixed old and new binaries?)");
#define DOVECOT_CONFIG_BIN_PATH BINDIR"/doveconf"
-#define CONFIG_HANDSHAKE "VERSION\t1\t0\n"
+#define CONFIG_HANDSHAKE "VERSION\tconfig\t1\t0\n"
#undef DEF
#define DEF(type, name) \
static int anvil_connect(void)
{
-#define ANVIL_HANDSHAKE "VERSION\t1\t0\n"
+#define ANVIL_HANDSHAKE "VERSION\tanvil\t1\t0\n"
int fd;
fd = net_connect_unix("anvil");
#include <unistd.h>
-#define ANVIL_HANDSHAKE "VERSION\t1\t0\n"
+#define ANVIL_HANDSHAKE "VERSION\tanvil\t1\t0\n"
static int anvil_send_handshake(int fd, const char **error_r)
{