Keep the data for the existing threads so they do not reference garbage. Thanks-to: http://forum.pfsense.org/index.php/topic,57143.msg308927.html#msg308927
Add a patch that allows the ftp proxy monitored ports to be configured through debug.pfftpports as comma separated list of ports
Use initialization and destroy functions to make code readble and correct. Also when getaddrinfo returns any error report it as such so entries do not expire
Use a per thread var to singla its cancellation rather than relying on pthread_cancel. do the cleanup there as well