diff --git a/src/managesieve-login/client.c b/src/managesieve-login/client.c index 681d643b92cb31c5db2608c997a527d9e91bae7e..c8df513477d053819baf3e6ca1ed00e68f9d4970 100644 --- a/src/managesieve-login/client.c +++ b/src/managesieve-login/client.c @@ -159,7 +159,6 @@ static int cmd_xclient (struct managesieve_client *client, const struct managesieve_arg *args) { - unsigned int remote_port; const char *arg; bool args_ok = TRUE; @@ -174,11 +173,8 @@ static int cmd_xclient 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;