]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-imap: test_imap_url didn't compare port numbers
authorPhil Carmody <phil@dovecot.fi>
Thu, 3 Jul 2014 09:42:11 +0000 (12:42 +0300)
committerPhil Carmody <phil@dovecot.fi>
Thu, 3 Jul 2014 09:42:11 +0000 (12:42 +0300)
It only compare them when they were unset, and defaulting both to 0.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
src/lib-imap/test-imap-url.c

index 9732a62d5be8c39cdab5077b5e7558c34dd0e74e..6692347e5710a320ec515365f9ff9cdee4f6fe9e 100644 (file)
@@ -650,7 +650,7 @@ static void test_imap_url_valid(void)
                                test_out(t_strdup_printf("url->auth_type = %s", urlp->auth_type),
                                        strcmp(urlp->auth_type, urlt->auth_type) == 0);
                        }
-                       if (urlp->have_port) {
+                       if (!urlp->have_port) {
                                test_out("url->port = (unspecified)",
                                        urlp->have_port == urlt->have_port);
                        } else {