changeset 2809:0b1bef51f207 HEAD

Separate major/minor version with TAB instead of dot in VERSION.
author Timo Sirainen <tss@iki.fi>
date Fri, 22 Oct 2004 16:42:55 +0300
parents 48250919bbc4
children 74517c34a687
files src/auth/auth-client-connection.c src/auth/auth-master-connection.c src/lib-auth/auth-server-connection.c src/master/auth-process.c
diffstat 4 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/auth-client-connection.c	Fri Oct 22 16:34:06 2004 +0300
+++ b/src/auth/auth-client-connection.c	Fri Oct 22 16:42:55 2004 +0300
@@ -370,7 +370,7 @@
 
 		/* make sure the major version matches */
 		if (strncmp(line, "VERSION\t", 8) != 0 ||
-		    atoi(t_strcut(line + 8, '.')) !=
+		    atoi(t_strcut(line + 8, '\t')) !=
 		    AUTH_CLIENT_PROTOCOL_MAJOR_VERSION) {
 			i_error("Authentication client %u "
 				"not compatible with this server "
@@ -439,7 +439,7 @@
 	master->clients = conn;
 
 	str = t_str_new(128);
-	str_printfa(str, "VERSION\t%u.%u\nSPID\t%u\nCUID\t%u\nDONE\n",
+	str_printfa(str, "VERSION\t%u\t%u\nSPID\t%u\nCUID\t%u\nDONE\n",
                     AUTH_CLIENT_PROTOCOL_MAJOR_VERSION,
                     AUTH_CLIENT_PROTOCOL_MINOR_VERSION,
 		    master->pid, conn->connect_uid);
--- a/src/auth/auth-master-connection.c	Fri Oct 22 16:34:06 2004 +0300
+++ b/src/auth/auth-master-connection.c	Fri Oct 22 16:42:55 2004 +0300
@@ -176,7 +176,7 @@
 
 		/* make sure the major version matches */
 		if (strncmp(line, "VERSION\t", 8) != 0 ||
-		    atoi(t_strcut(line + 8, '.')) !=
+		    atoi(t_strcut(line + 8, '\t')) !=
 		    AUTH_MASTER_PROTOCOL_MAJOR_VERSION) {
 			i_error("Master not compatible with this server "
 				"(mixed old and new binaries?)");
@@ -261,7 +261,7 @@
 void auth_master_connection_send_handshake(struct auth_master_connection *conn)
 {
 	if (conn->output != NULL) {
-		master_send(conn, "VERSION\t%u.%u\nSPID\t%u\n",
+		master_send(conn, "VERSION\t%u\t%u\nSPID\t%u\n",
 			    AUTH_MASTER_PROTOCOL_MAJOR_VERSION,
                             AUTH_MASTER_PROTOCOL_MINOR_VERSION, conn->pid);
 	}
--- a/src/lib-auth/auth-server-connection.c	Fri Oct 22 16:34:06 2004 +0300
+++ b/src/lib-auth/auth-server-connection.c	Fri Oct 22 16:42:55 2004 +0300
@@ -147,7 +147,7 @@
 
 		/* make sure the major version matches */
 		if (strncmp(line, "VERSION\t", 8) != 0 ||
-		    atoi(t_strcut(line + 8, '.')) !=
+		    atoi(t_strcut(line + 8, '\t')) !=
 		    AUTH_CLIENT_PROTOCOL_MAJOR_VERSION) {
 			i_error("Authentication server not compatible with "
 				"this client (mixed old and new binaries?)");
@@ -227,7 +227,7 @@
 	conn->next = client->connections;
 	client->connections = conn;
 
-	handshake = t_strdup_printf("VERSION\t%u.%u\nCPID\t%u\n",
+	handshake = t_strdup_printf("VERSION\t%u\t%u\nCPID\t%u\n",
 				    AUTH_CLIENT_PROTOCOL_MAJOR_VERSION,
                                     AUTH_CLIENT_PROTOCOL_MINOR_VERSION,
 				    client->pid);
--- a/src/master/auth-process.c	Fri Oct 22 16:34:06 2004 +0300
+++ b/src/master/auth-process.c	Fri Oct 22 16:42:55 2004 +0300
@@ -217,7 +217,7 @@
 
 		/* make sure the major version matches */
 		if (strncmp(line, "VERSION\t", 8) != 0 ||
-		    atoi(t_strcut(line + 8, '.')) !=
+		    atoi(t_strcut(line + 8, '\t')) !=
 		    AUTH_MASTER_PROTOCOL_MAJOR_VERSION) {
 			i_error("Auth process %s not compatible with master "
 				"process (mixed old and new binaries?)",
@@ -269,7 +269,7 @@
 					 FALSE);
 	p->requests = hash_create(default_pool, default_pool, 0, NULL, NULL);
 
-	handshake = t_strdup_printf("VERSION\t%u.%u\n",
+	handshake = t_strdup_printf("VERSION\t%u\t%u\n",
 				    AUTH_MASTER_PROTOCOL_MAJOR_VERSION,
 				    AUTH_MASTER_PROTOCOL_MINOR_VERSION);
 	(void)o_stream_send_str(p->output, handshake);