dovecot-2.2-pigeonhole: Changed type of internet port values to ...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Sat Aug 29 13:04:47 UTC 2015


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/f84fbac570f5
changeset: 2092:f84fbac570f5
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Sat Aug 29 13:12:58 2015 +0200
description:
Changed type of internet port values to in_port_t everywhere.

diffstat:

 src/managesieve-login/client.c |  6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diffs (24 lines):

diff -r 72e423848263 -r f84fbac570f5 src/managesieve-login/client.c
--- a/src/managesieve-login/client.c	Sat Aug 29 12:53:29 2015 +0200
+++ b/src/managesieve-login/client.c	Sat Aug 29 13:12:58 2015 +0200
@@ -159,7 +159,6 @@
 (struct managesieve_client *client,
 	const struct managesieve_arg *args)
 {
-	unsigned int remote_port;
 	const char *arg;
 	bool args_ok = TRUE;
 
@@ -174,11 +173,8 @@
 			if (net_addr2ip(arg + 5, &client->common.ip) < 0)
 				args_ok = FALSE;
 		} else if ( strncasecmp(arg, "PORT=", 5) == 0 ) {
-			if (str_to_uint(arg + 5, &remote_port) < 0 ||
-			    remote_port == 0 || remote_port > 65535)
+			if (net_str2port(arg + 5, &client->common.remote_port) < 0)
 				args_ok = FALSE;
-			else
-				client->common.remote_port = remote_port;
 		} else if ( strncasecmp(arg, "SESSION=", 8) == 0 ) {
 			const char *value = arg + 8;
 


More information about the dovecot-cvs mailing list