Various cleanups in transport_session.c:
1. In init_transport(): guard against a NULL server parameter.
2. In session_free(): if the session is still open, disconnect it.
3. In session_connect(): if we open a socket but are unable to connect to Jabber, close the
socket and set the sock_id member to zero. If the socket is already open, return an error,
instead of reusing the existing socket (and trying to overlay any open Jabber session).
4. In session_connect(): guard against an invalid auth_type.
5. In session_connect(): corrected some errors in the way we calculate buffer sizes,
6. In session_disconnect(): send a disconnect message only if the socket is still open.
7. Tidied up white space and comments in various places.
8. Added doxygen-style comments to document some of the functions.
M src/libopensrf/transport_session.c
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1822
9efc2488-bf62-4759-914b-
345cdb29e865