Hi all, attached is a patch which improves the low-level network library, and should improve the responsiveness of POP3 connections on error. For the network library, it introduces two new methods for shutting down the network connection, and for checking the connection status. The unit tests have been fixed, and the testing prerequisite ncat has been replaced by a trivial Python script. For POP3 connections, on error the connection is now terminated without sending the QUIT command, as to avoid a “hanging” connection while waiting for a reply or a timeout to it. As the patch modifies configure.ac, I guess the meson build stuff needs to be modified as well, but unfortunately I don't know how (probably just removing the “sed_program” and “ncat_program” checks?). It would be great if someone with deeper insight could have a look at it. Opinions? Cheers, Albrecht. --- Patch details: - configure.ac: add missing flags and libs for libnetclient unit tests, drop sed and ncat prerequisites - libbalsa/mailbox_pop3.c: shut down the connection on error, so un'refing it does not wait for the QUIT command - libnetclient/Makefile.am: fix log domain - libnetclient/README: update documentation - libnetclient/net-client-pop.c: execute QUIT only if the connection exists - libnetclient/net-client-smtp.c: fix FlexeLint warnings about ignored function return values, execute QUIT only if the connection exists - libnetclient/net-client.[ch]: implement new methods for shutting down the network connection and for checking the connection status - libnetclient/test/Makefile.am: drop sed and ncat requirements, fix test application build error - libnetclient/test/echoserver.py: (new file) trivial echo server in Python - libnetclient/test/start-test-env.sh.in: control the echo server for testing - libnetclient/test/tests.c: improve unit tests
Attachment:
network_improvements.diff.bz2
Description: application/bzip
Attachment:
pgpAgjKiIaQAH.pgp
Description: PGP signature