The _xapian_validate_port() function was unnecessarily confusing -- switched from &&'s to ||'s to simplify it. Also, it was possible to set an invalid port by setting the invalid port first, then setting the database type from local to remote. This patch makes it so we always validate the port. It's no longer possible to set an invalid port.

(Note, this patch depends on this cleanup patch.)

CommentFileSizeAuthor
#2 xapian.module.patch2.14 KBjeremy
xapian.module.patch1.13 KBjeremy

Comments

jeremy’s picture

Status: Active » Needs review

Update issue status to reflect that there's a patch attached.

jeremy’s picture

StatusFileSize
new2.14 KB

Expand patch to also simplify _xapian_validate_positive_integer() the same way.

singularo’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.